Olympic Games

SQL - POWER BI
Project image

This project was made using the following Youtube video as a reference: Click here to see the video.

The work consisted in using the .bak database, import it in Microsoft SQL Server Management Studio and do some tasks in order to get the related tables. The original database had two tables, the first one with data about the athlete's country and the other one with data about the athlete, the olympic games, the sports and the winners.

First of all, the following actions were carried out in the table that had more information:

  • Split into two different columns the values of year and season, that were initially in one column.

  • Turn into NULL the NA values when the athlete didn´t win any medal.

  • Create different tables for: athletes, games, events, sports and medals.

  • Remove duplicates from the new tables and replace in the original table the columns of the new tables for the ID number (foreign keys).

Then, it was identified that in the table of countries some names were duplicated with differences/typing errors, therefore, the following was done:

  • A csv file with names and ISO3 codes of the countries was imported and names in the table of countries were replaced for the correct ones.

Finally in SQL, the top 10 countries with the most medals in the summer olympic games were consulted.

After finishing in SQL, the database was connected to Power BI and the following aditional steps were taken:

  • Add a new auxiliary table to calculate the age of each athlete at the moment of the olympic games

  • Create measures for the age, the weight and the height.

The following recomendations were followed to create the map graph: Steve Winward Github

This is how the dashboard looks after appliyng some filters: