# Iron Duck Qualification

THE GREAT DUCK MIGRATION! · challenge 33 · hard

> Admiral Aqua unveils the prestigious Iron Duck competition framework with great ceremony. "The ultimate test of migration readiness! The Iron Duck designation is reserved for our most versatile elite athletes - ducks who have not only competed in ALL four disciplines but achieved excellence in EACH one. We need athletes scoring 90 or above in swimming, running, diving, AND flying_speed. These complete athletes can handle any challenge the migration throws at us. Transform our performance data to reveal these exceptional few!"

## Task

Return the sum of SSNs for all ducks who qualify as Iron Ducks - athletes who have achieved a best score of 90 or higher in ALL four sports (swimming, running, diving, and flying_speed). Transform the data to compare each duck's best performance across all disciplines simultaneously. 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/33

## Answer

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