The Weapons table shows the most common weapons used in the worlds of D&D, their price and weight, the damage they deal when they hit, and any special properties they possess. Every weapon is classified as either melee or ranged. A melee weapon is used to attack a target within 5 feet of you, whereas a ranged weapon is used to attack a target at a distance.
The "or" in that bolded part is important. A dagger is a melee weapon with the thrown property, so it can be used to make a ranged attack, but it is not a ranged weapon. Just like a whip is not a ranged weapon it just has reach, the reach property lets the weapon work further than 5' away just like the thrown property does.
So dagger melee weapon not ranged, but because it is a finesse weapon it can be used to make sneak attacks when you throw it, just remember to apply disadvantage past 20' unless they have the sharpshooter feet.
A hand axe can be thrown but it too is not a ranged weapon, and because it is not finesse it can not be used to make sneak attacks.
You have to be careful about the wording, some things only work with "ranged weapons" and some things with "ranged weapon attacks", the language is confusing. A hand axe when thrown is considered a "ranged weapon attack" but it is still not a "ranged weapon"
What that means for example, you can not sneak attack with the hand axe, you do not get a +2 to hit with the Archery fighting style when you throw the hand axe, but a monk can spend a point of ki to deflect a hand axe.
Sharpshooter feat has three benifits, the first two no disadvantage at long range and ignoring half & 3/4 cover apply to "ranged weapon attacks" and thus apply when you throw a melee weapon. The third part of sharpshooter the -5/+10 only applies to attacks with a "ranged weapon" and thus can't be applied to thrown melee weapons like daggers.