Skip to the content

The 2011s

Problem

The neighborhood youth soccer league sets its age groups by birth year, and the school has to field a team in the 2011 group: you play if you were born that year, not before and not after. The coach wants the roster.

Show the name and the date of birth of every student who can play, in that order. In this database a date is text like 2011-06-21: the year comes first.

What it has to return

These rows, in any order

nameborn
Henry2011-06-21
Julia2011-01-30

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
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 →