FunctionRacerProblemsRace

Three Days Running

HardSQLSQLite

logins has a row for every login: day is a day number (day 1, day 2, and so on), and a user may log in several times on one day. Return each user_id that logged in on at least three days in a row, once. Rows may come in any order.

Example 1

logins
user_idday
14
15
15
16
21
22
24
25
returns
user_id
1

Constraints

Race itor take your time

Write it in your browser, against the clock. The model query, with a note on each piece of it, comes after.

More SQL problems