This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
We're actively looking for ideas on how to improve Weekly Challenges and would love to hear what you think!Submit Feedback
A solution to last week’s challenge can be found here.
As we gear up for the 2021 Summer Olympics, let's take a look back at the countries and athletes that participated in the last Summer Olympics.
- The "athletes" dataset contains data about the athletes who competed in the 2016 Summer Olympics in Rio de Janeiro.
- The "countries" dataset contains the International Olympic Committee country code.
Find the following for each country:
- The sport with the most athletes
- The total number of athletes
- The total number of female athletes
- The total number of male athletes, and
- The average age of all athletes for each country
Hint for the 2016 Summer Olympics
Opening Date: August 5th, 2016
Closing Date: August 21st, 2016
Looks like there's a few erroneous nulls in the solution. This will be because a number + Null() = Null(). Gotta zero those nulls first.
Made sure to use the start date for the Rio Olympics when calculating the athlete's ages.
Solution to this week's challenge is attached. Age calculation is a bit unclear, but appears to be based on 2016-08-05. I copied that item from @Aaron_Harter solution.
Here is my submission; you need to find out the average age in the year 2016!