Skip to the content

An afternoon read

Problem

A library member has the afternoon free and wants a book they can finish today: 200 pages at most. And nothing from before 1980: the print in those editions is too small for them.

Show the title, the number of pages, and the year of publication of the books that work for them, in that order.

What it has to return

These rows, in any order

titlepagespublished
The Blue House1802011
Loose Leaves951987

This is what comes out with the data in the practice database this challenge uses. The column names don’t count, so name yours however you like: what counts is how many there are and the order they come in. Besides this one, the challenge has hidden tests with other data that are revealed when you submit your solution.

You start with this

SQL

SELECT title, pages, published
FROM books
Solve this challenge

It opens in your browser, with the editor and the tests. It is free and you do not need an account to start.

More O(1) challenges

See all challenges →