# Weekend Warriors

THE GREAT DUCK MIGRATION! · challenge 23 · medium

> Captain Cosmos descends with astronomical charts and competition scheduling records. "The weekend warriors hold a special place in migration lore! While most ducks rest on Saturdays and Sundays, some dedicated athletes sacrifice their leisure time to compete when others are lounging by the pond. These weekend competitors demonstrate exceptional commitment - they train during the week AND compete when they could be relaxing. Find all ducks who have entered at least one competition on a Saturday or Sunday. Their willingness to go the extra mile makes them perfect candidates for the demanding overnight flight shifts during our migration!"

## Task

Return the sum of SSNs for all ducks who have competed in at least one competition held on a weekend (Saturday or Sunday). Count each duck only once regardless of how many weekend competitions they entered. You will be working with the `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/23

## Answer

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