# Regional Excellence Analysis

THE GREAT DUCK MIGRATION! · challenge 22 · medium

> Mayor Mallory arrives with regional census data and athletic performance charts from every township in the land. "Inter-regional pride is at stake! Every hometown claims to produce the best athletes, but we need DATA to settle this debate once and for all. Analyze all competition performances and determine which hometown's athletes achieve the highest average scores. This winning region will lead our migration departure ceremony with their banner held high! Consider every competition entry from every athlete - the hometown that consistently produces excellence across the board deserves recognition!"

## Task

Return the name of the hometown whose athletes have achieved the highest average score across all their competition entries. Consider all performances from all ducks from each hometown. 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/22

## Answer

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