I am on a learning phase of SQL and I'm using the Microsoft SQL Server Management Studio 19. I was learning from Youtube, where the video states that the ORDER BY
call by default sets the contents in ascending order.
But in my machine it is the other way around I also tried using the ASC and DESC calls.
I wanted the data to be arranged in ascending order i.e., count 2 and then count 3
2条答案
按热度按时间fcipmucu1#
In that case you need to order by the count and not the gender.
bvuwiixz2#
Another side note: calling the result column 'AgeCount' when it's actually a gender count (or gender-count-over-30, anyway) could be confusing, for yourself as well as others.