SQL Challenges · THE GREAT DUCK MIGRATION!

Training Progress Review

Difficulty: medium

General Gander spreads tactical maps across the planning table. Military precision demands clear battle plans! I need athletes who competed in 2024 AND improved in 2025. First identify 2024 participants, then cross-reference with 2025 improvements!

Your task

Return the sum of SSNs for all ducks who competed in both 2024 and 2025, and whose overall average score improved from 2024 to 2025. Calculate the overall average by taking the mean of all their scores in that year (across all sports and all attempts combined). 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/16.md

Play this challenge →