

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 5
click for more info
Not enough gems
Cost: 6 gems
1: What Are Aggregations?
incomplete
2: SUM
incomplete
3: MAX
incomplete
4: MIN
incomplete
5: GROUP BY
incomplete
6: Average
incomplete
7: HAVING
incomplete
8: HAVING vs. WHERE in SQL
incomplete
9: ROUND
incomplete
10: Query Practice – Average Ages
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
The CashPal marketing team was able to optimize their advertising with the help of the user data we pulled. However, they now want you to query the average age of users for each country that the business operates in, not just the United States.
Write an SQL statement that returns two columns, the country_code and the average age of users for records with that country_code. The marketing team has asked that we round the average to the nearest whole number and rename the column that contains the average age to average_age.