Session Ready
Exercise

Fixing duplication through a JOIN

In the previous exercise, you set up a query that contained duplication. This exercise will remove the duplication. One approach to removing duplication is to change the JOIN logic by adding another field to the ON statement.

The final query from last exercise is shown in the console. Your job is to fix the duplication by updating the ON statement. Note that the total gold_medals value should be 47.

Feel free to reference the E:R Diagram.

Instructions
100 XP
  • Update the ON statement in the subquery by adding a second field to JOIN on.
  • If an error occurs related to the new JOIN field, use a CAST() statement to fix it.