Mobile Users
Which users signed up using a mobile device?
- Filtering
- Sorting
Challenge brief
Understand the request
Device Strategy is evaluating mobile-first product investments and needs a list of all users who registered via a mobile device.
Return user_id, country, device_type, signup_date in the declared deterministic order.
Return
- user_id
- country
- device_type
- signup_date
Constraints
- Return only users whose device type is 'mobile'
- 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)device_typeVARCHAR(20)signup_dateDATE
Hints, when you need them
Open one clue at a time so you still do the reasoning.
Hint 1
The device attribute is stored with each user.
Hint 2
Apply the device condition before projection.
Hint 3
Return the requested user attributes in identifier order.
Verified SQL answer
Attempt the problem first, then compare structure and reasoning—not just syntax.
Reveal solution and explanation
SELECT user_id, country, device_type, signup_date FROM users WHERE device_type = 'mobile' ORDER BY user_idWhy this works
12 of 23 users signed up on mobile. The other 11 used desktop (7) or tablet (4). SELECT * returns all four columns for the filtered rows.
Success check
Returns the complete deterministic result for mobile users
Expected result
Use this output to verify values, aliases, ordering, and row count.
| user_id | country | device_type | signup_date |
|---|---|---|---|
| 1 | USA | mobile | 2023-01-15 |
| 3 | UK | mobile | 2023-03-10 |
| 4 | India | mobile | 2023-04-05 |
| 7 | Germany | mobile | 2023-07-22 |
| 8 | India | mobile | 2023-08-30 |
| 10 | Canada | mobile | 2023-10-25 |
| 11 | USA | mobile | 2023-11-05 |
| 13 | Japan | mobile | 2023-12-01 |
| 15 | Brazil | mobile | 2024-01-05 |
| 17 | UK | mobile | 2024-01-15 |
Previewing 10 of 13 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
Explore related company challenges
Meta
Independent Meta-style social-product, engagement, content, community, messaging, and advertising SQL practice.
Microsoft
Independent Microsoft-style cloud, productivity, subscription, usage, support, and customer analytics SQL practice.
Netflix
Independent Netflix-style streaming, subscription, catalog, ratings, and engagement SQL practice.
Return to the complete interview preparation experience.