Skip to the content

Nobody sings for them

Problem

Winter break cuts into December and January, and a birthday in either month tends to get skipped: half the class is already gone, or school is closed that day. The teacher wants to celebrate all of them together on the last day before break, and needs to know who they are.

Show the name and the date of birth of everyone with a birthday in December or January, in that order. A date is text like 2010-12-25: the year, the month, and the day, with a hyphen between them.

What it has to return

These rows, in any order

nameborn
Julia2011-01-30
Sara2010-12-25

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 name, born
FROM students
WHERE born LIKE '%12%'
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 →