SQL Challenges · THE GREAT DUCK MIGRATION!

The Incomplete Roster

Difficulty: hard

Coach Waddles flips through training rosters with growing concern. We have four core disciplines - swimming, flying_speed, running, and diving. Most of our athletes have trained in all four, but some have gaps in their experience! I need to identify ducks who competed in exactly three sports. These athletes require targeted training in their missing discipline before we depart. Their near-complete skill sets make them valuable, but that one gap could be dangerous!

Your task

Return the sum of SSNs for all ducks who have competed in exactly 3 different sports throughout their career. You will be working with `duck_athletes` and `performance_records` tables.

Tables

performance_records (800 rows)

columntype
duck_idBIGINT
sportVARCHAR
scoreDOUBLE
competition_dateDATE

duck_athletes (50 rows)

columntype
idBIGINT
ssnBIGINT
nameVARCHAR
ageBIGINT
hometownVARCHAR

Database: https://dbquacks.com/data/databases/athletic_champions.duckdb

This page as markdown: https://dbquacks.com/challenges/athletic/25.md

Play this challenge →