SQL Challenges · THE GREAT DUCK MIGRATION!

The Missing Water Drill

Difficulty: medium

Coach Waddles taps the swimming roster with a dripping feather. These ducks were in the water in 2024, Duckbert. In 2025? Not a single lap! A flying medal wont get anyone across the rapids. Find the ducks who swam in 2024 but havent entered a single swimming competition in 2025. Sum their identification codes so I can call them back for a refresher before we depart!

Your task

Return the sum of SSNs for all ducks who competed in swimming at least once during 2024 but never competed in swimming during 2025. A duck still qualifies if it competed in other sports during 2025 or did not compete at all in 2025. Count each duck only once. You will be working with the `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/39.md

Play this challenge →