I. Dataset Summary

This is a historical dataset on the modern Olympic Games, including all the Games from Athens 1896 to Rio 2016.

Note that the Winter and Summer Games were held in the same year up until 1992. After that, they staggered them such that Winter Games occur on a four-year cycle starting with 1994, then Summer in 1996, then Winter in 1998, and so on. A common mistake people make when analyzing this data is to assume that the Summer and Winter Games have always been staggered.

II. Dataset

The file athlete_events.csv contains 271,116 rows and 15 columns. Each row corresponds to an individual athlete competing in an individual Olympic event (athlete-events). The columns are:

  1. ID: Unique number for each athlete
  2. Name: Athlete's name
  3. Sex: M or F
  4. Age: Integer
  5. Height : In centimeters
  6. Weight : In kilograms
  7. Team : Team name
  8. NOC : National Olympic Committee 3-letter code
  9. Games : Year and season
  10. Year : Integer
  11. Season : Summer or Winter
  12. City : Host city
  13. Sport : Sport
  14. Event : Event 
  15. Medal : Gold, Silver, Bronze, or NA

The file noc_regions.csv contains 230 rows and 3 columns. The columns are:

  1. NOC (National Olympic Committee 3 letter code)
  2. Country name (matches with regions in map_data("world"))
  3. Notes

III. Language: PostgresSQL

IV. List of queries

  1. How many olympics games have been held?
  2. List down all Olympics games held so far.
  3. Mention the total no of nations who participated in each olympics game?
  4. Which year saw the highest and lowest no of countries participating in olympics?
  5. Which nation has participated in all of the olympic games?
  6. Identify the sport which was played in all summer olympics.
  7. Which Sports were just played only once in the olympics?
  8. Fetch the total no of sports played in each olympic games.
  9. Fetch details of the oldest athletes to win a gold medal.
  10. Find the Ratio of male and female athletes who participated in all olympic games.
  11. Fetch the top 5 athletes who have won the most gold medals.
  12. Fetch the top 5 athletes who have won the most medals (gold/silver/bronze).
  13. Fetch the top 5 most successful countries in olympics. Success is defined by no of medals won.
  14. List down total gold, silver and bronze medals won by each country.
  15. List down total gold, silver and bronze medals won by each country corresponding to each olympic games.
  16. Identify which country won the most gold, most silver and most bronze medals in each olympic games.
  17. Identify which country won the most gold, most silver, most bronze medals and the most medals in each olympic games.
  18. Which countries have never won gold medal but have won silver/bronze medals?
  19. In which Sport/event, India has won highest medals.
  20. Break down all olympic games where india won medals for Hockey and how many medals in each olympic games.

BACK TO HOMEPAGE