# STANDING ROOM ONLY

WEEKLY QUACK CHALLENGE! · challenge 12 · hard · 5 guesses

> Safety Warden Bufflehead marches in wearing a hi-vis vest, clipboard trembling. "The Feather Fair's fire code allows five ducks inside any attraction at a time, Duckbert. FIVE. And I have a stack of complaints saying somebody broke it on Saturday. The Tilt-a-Waddle crew swear they're innocent — 'we had the most riders, sure, but they were in and out in six minutes!' The bumper boat crew say their sessions run long but never crowded. I don't care who had the most riders or the longest rides. I want the attraction that was the most packed at one single moment. Find it before the gates open again!"

## Task

Each visit is one duck, inside the attraction from its entry time up to, but not including, its exit time — a duck leaving at 14:45 is already outside at 14:45. For each attraction, find the largest number of ducks inside at the same moment. Return the name of the attraction with the highest peak; on a tie, the alphabetically first. You will be working with the `visits` and `attractions` tables.

## Tables

### `visits` (34 rows)

| column | type |
| --- | --- |
| visit_id | INTEGER |
| attraction_id | INTEGER |
| entered_at | TIMESTAMP |
| left_at | TIMESTAMP |

### `attractions` (4 rows)

| column | type |
| --- | --- |
| attraction_id | INTEGER |
| name | VARCHAR |

## Data

The tables live in a DuckDB database: https://dbquacks.com/data/databases/weekly_202638_12_feather_fair.duckdb

To query it outside the browser, attach it read-only:

```sql
ATTACH 'https://dbquacks.com/data/databases/weekly_202638_12_feather_fair.duckdb' AS db (READ_ONLY);
USE db;
```

Play it in the browser: https://dbquacks.com/challenges/weekly/12

## Answer

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