Code RoomSession first event
HardPrep Room Coding #5082

Session first event

SQLAlgorithms & data structuresSenior–Staff~15 min

For each session, return its earliest event. Give `session_id`, `name` and `occurred_on`, ordered by session.

What a strong answer looks like

Say what the query is meant to return before you write it, and name the shape of the answer: how many rows, grouped by what. Then watch the NULLs and the duplicates, because that is where most of these are lost.

Run onlyA query runs as one statement, so there is nothing to step through. Run it and read the rows.

0:00 of about 15 min

Expected, in this order

session_idnameoccurred_on
s1signup2026-01-02
s2view2026-01-03
s3signup2026-01-02
s4signup2026-01-15
s5view2026-01-16
s6signup2026-02-01

3 more rows

Your result

Run your query to compare.

1 more set of rows are waiting. Free with an account.