An afternoon read
- O(1) · Trivial
- Free
- SQL
- filtering
- comparisons
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
| title | pages | published |
|---|---|---|
| The Blue House | 180 | 2011 |
| Loose Leaves | 95 | 1987 |
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 booksSolve 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.