AnalystPath

Clean-Rated Audiobooks Aired in March

SQLEasyJunior level~15 min

Problem

An audio streaming service stores a broadcast schedule and a catalog of episodes.

Table: `Schedule`

```text
+----------+---------+
| Column | Type |
+----------+---------+
| air_time | date |
| ep_id | int |
| station | varchar |
+----------+---------+
Each row says an episode aired at a given time on a station.
```

Table: `Catalog`

```text
+------------+---------+
| Column | Type |
+------------+---------+
| ep_id | varchar |
| ep_title | varchar |
| family_safe| varchar |
| format | varchar |
+------------+---------+
family_safe is 'Y' or 'N'. format is one of 'Audiobook', 'Podcast', etc.
```

Return the distinct titles of episodes that are family-safe ('Y'), are in the 'Audiobook' format, and aired at any point in March 2021 (between 2021-03-01 and 2021-03-31). Name the column `ep_title`.

Tables

Example rows — the live problem includes the full dataset.

Schedule
air_timeep_idstation
2021-03-10 08:001Wave-FM
2021-02-11 12:002Wave-FM
2021-02-12 12:003Wave-FM
Catalog
ep_idep_titlefamily_safeformat
1Market WatchNAudiobook
2Tales for CubsYPodcast
3Query SchoolNPodcast

Expected output

Your answer should return 1 row with the columns ep_title.

Starter code (SQL)

SELECT *
FROM Schedule;

Solve this SQL question free

Write SQL and run it instantly in your browser — even on your phone. No signup needed to try.

Solution & explanation

Create a free account to unlock the optimal solution, a step-by-step explanation, and the hidden test cases that grade your answer.

Sign up free to unlock

Related SQL questions