Netflix-style Company ChallengeBeginnerVerified answerSQLite live

User Directory

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

  • Date analysis
  • Sorting

Challenge brief

Understand the request

Growth Analytics The growth team needs a baseline roster of all registered users for an upcoming geo-targeting campaign.

List every user with their country and signup date.

Return

  • user_id
  • country
  • signup_date

Constraints

  • Return 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 user directory contains every requested attribute.

Hint 2

Project the three fields without filtering rows.

Hint 3

Apply the user identifier as the final ordering 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 with ORDER BY user_id. No JOIN or filter needed — all columns come from the users table.

Success check

Returns the complete deterministic result for user directory

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
6IN2023-06-01
7US2023-06-10
8DE2023-07-01
9BR2023-07-15
10FR2023-08-01

Previewing 10 of 11 expected rows. Run the query in the editor to inspect the full result.

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.