101
0/304
Loading content...
A streaming operations team wants a clean list of family-safe films aired during a specific month.
Table: stream_schedule
Table: content_catalog
Task: Report all distinct titles that satisfy every rule below:
Output requirements:
Supported submission environments:
stream_schedule:
| program_date | content_id | channel |
|----------------------|------------|----------------|
| 2020-06-03 08:00:00 | 11 | Kids Grid |
| 2020-06-10 12:30:00 | 13 | Family Prime |
| 2020-06-11 14:00:00 | 14 | Family Prime |
| 2020-05-21 09:15:00 | 12 | Learning Hub |
| 2020-07-05 10:00:00 | 15 | Family Prime |
content_catalog:
| content_id | title | kid_friendly | content_type |
|------------|------------------|--------------|--------------|
| 11 | Velocity Story | N | Movie |
| 12 | Planet Explorers | Y | Series |
| 13 | Sky Harbor | Y | Movie |
| 14 | Sky Harbor | Y | Movie |
| 15 | Moonlight Tales | Y | Movie |[
{"title":"Sky Harbor"}
]Only title 'Sky Harbor' is both kid-friendly and classified as Movie, and it is aired in June 2020. Duplicate title rows collapse into one output row.
stream_schedule:
| program_date | content_id | channel |
|----------------------|------------|--------------|
| 2020-06-01 08:00:00 | 21 | Main |
| 2020-06-02 09:00:00 | 22 | Main |
| 2020-06-03 10:00:00 | 23 | Main |
content_catalog:
| content_id | title | kid_friendly | content_type |
|------------|-------------------|--------------|--------------|
| 21 | Night Tracker | N | Movie |
| 22 | Math Galaxy | Y | Series |
| 23 | Global Briefing | N | Documentary |[]No row satisfies both eligibility conditions simultaneously, so the result is empty.
stream_schedule:
| program_date | content_id | channel |
|----------------------|------------|--------------|
| 2020-06-01 00:00:00 | 31 | Sunrise |
| 2020-06-30 23:59:59 | 31 | Sunset |
| 2020-06-15 17:00:00 | 32 | Prime |
| 2020-07-01 00:00:00 | 32 | Prime |
content_catalog:
| content_id | title | kid_friendly | content_type |
|------------|------------------|--------------|--------------|
| 31 | Forest Friends | Y | Movie |
| 32 | City Heroes | Y | Movie |[
{"title":"City Heroes"},
{"title":"Forest Friends"}
]Both titles aired inside June 2020. The July 1 row is excluded. Repeated June airings for the same title still produce one output row.
Constraints