# Career Regression Alert

THE GREAT DUCK MIGRATION! · challenge 30 · hard

> Coach Waddles spreads out career trajectory charts with deep worry lines across his feathered brow. "The migration medics need an urgent report! We're tracking athletes whose journey has taken a concerning turn - ducks whose most recent performance in a sport has dropped significantly below their debut performance. A decline of 20 points or more from first attempt to latest attempt signals potential burnout, injury, or loss of confidence. These athletes need immediate intervention and support before we embark on our perilous journey!"

## Task

Return the sum of SSNs for all ducks who have experienced significant performance regression - where their latest score in any sport is at least 20 points lower than their debut score in that same sport (comparing their first competition to their most recent competition within each sport). Count each duck only once even if they regressed in multiple sports. You will be working with `duck_athletes` and `performance_records` tables.

## Tables

### `performance_records` (800 rows)

| column | type |
| --- | --- |
| duck_id | BIGINT |
| sport | VARCHAR |
| score | DOUBLE |
| competition_date | DATE |

### `duck_athletes` (50 rows)

| column | type |
| --- | --- |
| id | BIGINT |
| ssn | BIGINT |
| name | VARCHAR |
| age | BIGINT |
| hometown | VARCHAR |

## Data

The tables live in a DuckDB database: https://dbquacks.com/data/databases/athletic_champions.duckdb

To query it outside the browser, attach it read-only:

```sql
ATTACH 'https://dbquacks.com/data/databases/athletic_champions.duckdb' AS db (READ_ONLY);
USE db;
```

Play it in the browser: https://dbquacks.com/challenges/athletic/30

## Answer

The expected answer is not published. Submit on the page to have it checked.
