'Display the most popular male and female names

Display the most popular male and female names from the year 1983 from the database named BabyName

SELECT COUNT(name) "Most Popular M/F Names from 1983", name  
FROM BabyName 
GROUP BY name 
ORDER BY year = '1983' AND COUNT(name) DESC
LIMIT 50

This is trying to pull the most popular male and female names from the year 1983. This is using a database called babyname and its a fairly large database. This is the only way I figured out but I also feel like its wrong because its asking for the most popular female and male names. Any suggestions on how you might approach this? I can't show the DB information because its fairly large but it contains the name, gender, year they were born and the place they are from.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source