US Guests
Return user_id and signup_date for users in the US (country = 'US'), ordered by user_id.
- Filtering
- Sorting
Challenge brief
Understand the request
Growth — North America The North America growth team is building a targeted US user segment for an upcoming campaign.
Find all users who signed up from the United States.
Return
- user_id
- signup_date
Constraints
- Include only users whose country is 'US'
- Order by user ID
Data you will use
Review the relevant tables before deciding how to join, filter, or aggregate them.
users
user_idINTEGERcountryVARCHAR(50)signup_dateDATE
Hints, when you need them
Open one clue at a time so you still do the reasoning.
Hint 1
Country is stored with each user account.
Hint 2
Apply the country condition before projecting the output.
Hint 3
Use the user key to stabilize the result.
Verified SQL answer
Attempt the problem first, then compare structure and reasoning—not just syntax.
Reveal solution and explanation
SELECT user_id, signup_date FROM users WHERE country = 'US' ORDER BY user_idWhy this works
WHERE country = 'US' keeps only US registrations. signup_date is included so the growth team can see when each user joined.
Success check
Returns all and only US users in stable user order
Expected result
Use this output to verify values, aliases, ordering, and row count.
| user_id | signup_date |
|---|---|
| 1 | 2023-01-10 |
| 5 | 2023-05-05 |
| 7 | 2023-06-10 |
Learn the concepts behind this answer
Strengthen your understanding with these targeted learning topics:
Continue practicing
Explore related company challenges
Uber
Independent Uber-style mobility marketplace SQL practice covering trips, drivers, riders, pricing, payments, and promotions.
Amazon
Independent Amazon-style e-commerce, warehouse, inventory, and customer analytics SQL practice.
Meta
Independent Meta-style social-product, engagement, content, community, messaging, and advertising SQL practice.
Return to the complete interview preparation experience.