Historical data on the modern Olympic Games, from Athens 1896 to Rio 2016. Each row corresponds to an individual athlete competing in an individual event, including the athlete's name, sex, age, height, weight, country, and medal, and the event's name, sport, games, year, and city.
This dataset contains 2 tables, in CSV format:
The Athlete Events table contains over 270,000 Olympic performances across history Each record represents an individual athlete competing in an individual event Records contain details about the athlete (ID, sex, name, age, height, weight, country) and the event (games, year, city, sport, event, medal) The Country Definitions table serves as a lookup table with “NOC” as the primary key Each record represents one country according to the National Olympic Committee
Then another Query to check the total number of females and males to get an idea of the percent of the genders.
Finally to See the percentage of female and male over time ---- percentage of female and male athlethes
( select cast(count(id) as float) as total_athlete from olympics_history ) select sex, case when sex = 'M' THEN round(cast((count(*)/cte.total_athlete )100 as numeric),2) when sex = 'F' THEN round(cast((count()/cte.total_athlete)*100as numeric),2) end as athlete_percentage from olympics_history,cte group by sex, cte.total_athlete order by cte.total_athlete desc