# Relentless Cadence

THE GREAT DUCK MIGRATION! · challenge 35 · hard

> Scout Samantha unfurls a timeline of every competition entry stretching across the war table. "Migration readiness isn't built in a single event - it's forged through relentless, regular competition! Athletes who keep their gaps short between events stay sharp, their reflexes honed, their stamina peaking. I need the ducks whose average days between consecutive competitions is less than 70 - these high-frequency competitors never go cold and will be our most battle-ready flyers. Sum their identification codes for the intensive training squadron!"

## Task

Return the sum of SSNs for all ducks whose average gap (in days) between consecutive competitions is less than 70. Calculate the gap as the difference in days between each pair of consecutive competitions for a duck (ordered by competition_date), then average those gaps. Only include ducks who have at least two competitions. 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/35

## Answer

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