All problems

What's in Our Sci-Fi Library?

easySQLFiltering

StreamVerse's content team is building a "Sci-Fi Night" collection page and needs the list of titles that belong on it, taken from the catalogue rather than from memory.

Each show carries exactly one genre label, written as text. The label for science fiction is stored with a hyphen in it, and text is matched exactly as it was typed in — so the spelling in the query has to be the spelling in the table, hyphen included.

shows — one row per show in the catalogue. genre is a single label such as drama or comedy. release_year is the year it first aired.

id title genre release_year
1 Nebula Drift sci-fi 2021
2 The Long Kitchen drama 2019
3 Byte Size comedy 2022
4 Deep Trench documentary 2020
5 Neon Alley sci-fi 2023

The table already exists in the database — there is nothing to create or load.

Task: Write a query returning a single column, title, for every show whose genre is science fiction, in alphabetical title sequence.

Example output — shape only, on invented titles.

title
Copper Sky
Winter Signal

Sign in to solve this problem

Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.

Sign in

Discussion

Sign in to join the discussion — reading is open to everyone.

Loading comments…