# Versatile Victory Formation

THE GREAT DUCK MIGRATION! · challenge 12 · hard

> Admiral Aqua glides in with the final mission briefing. "The ultimate migration challenge requires versatility! Find all ducks who competed in at least 2 different sports AND achieved a score of 85 or higher in each sport type they attempted. These versatile champions can adapt to any situation - from swimming through floods to flying through storms. Their combined skills will ensure no obstacle stops our journey!"

## Task

Return the sum of SSNs for all ducks who competed in 2+ different sports and whose best score in EVERY sport they have attempted is 85 or higher. You will be working with the `duck_athletes` and `performance_records` tables to find versatile high performers.

## 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/12

## Answer

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