Airbnb-style Company ChallengeBeginnerVerified answerSQLite live

Guest Directory

Return user_id, country, and signup_date for all users, ordered by user_id.

  • Date analysis
  • Sorting

Challenge brief

Understand the request

Trust & Safety Trust & Safety needs a complete user roster for a compliance audit on account origins.

List every registered user with their country and signup date.

Return

  • user_id
  • country
  • signup_date

Constraints

  • Include every registered user
  • Order by user ID

Data you will use

Review the relevant tables before deciding how to join, filter, or aggregate them.

users

  • user_idINTEGER
  • countryVARCHAR(50)
  • signup_dateDATE

Hints, when you need them

Open one clue at a time so you still do the reasoning.

Hint 1

The requested attributes share one account table.

Hint 2

Project only the requested user fields.

Hint 3

Stabilize the roster with the user key.

Verified SQL answer

Attempt the problem first, then compare structure and reasoning—not just syntax.

Reveal solution and explanation
SELECT user_id, country, signup_date FROM users ORDER BY user_id

Why this works

A plain SELECT from users with ORDER BY user_id. All three columns come from the same table — no JOIN or filter needed.

Success check

Returns one row per user in stable user order

Expected result

Use this output to verify values, aliases, ordering, and row count.

user_idcountrysignup_date
1US2023-01-10
2IN2023-02-15
3UK2023-03-20
4CA2023-04-12
5US2023-05-05
6FR2023-06-01
7US2023-06-10
8DE2023-07-01
9BR2023-09-15

Learn the concepts behind this answer

Strengthen your understanding with these targeted learning topics:

Continue practicing

SQL Interview Practice

Return to the complete interview preparation experience.