Premium Subscribers
Return user_id, plan, and monthly_fee for every subscriber on the Premium plan, ordered by user_id.
- Filtering
- Sorting
Challenge brief
Understand the request
Revenue Operations Finance needs a list of Premium-tier subscribers to verify pricing ahead of the next billing cycle.
List all users on the Premium plan with their monthly fee.
Return
- user_id
- plan
- monthly_fee
Constraints
- Return only subscriptions on the 'Premium' plan
- Order by user ID
Data you will use
Review the relevant tables before deciding how to join, filter, or aggregate them.
subscriptions
subscription_idINTEGERuser_idINTEGERplanVARCHAR(20)monthly_feeINTEGER
Hints, when you need them
Open one clue at a time so you still do the reasoning.
Hint 1
Plan and fee are stored together on subscription rows.
Hint 2
Apply the plan condition before projection.
Hint 3
Return qualifying subscriptions in user order.
Verified SQL answer
Attempt the problem first, then compare structure and reasoning—not just syntax.
Reveal solution and explanation
SELECT user_id, plan, monthly_fee FROM subscriptions WHERE plan = 'Premium' ORDER BY user_idWhy this works
WHERE plan = 'Premium' keeps only Premium rows. Including plan and monthly_fee in the SELECT confirms which plan and price each user is on.
Success check
Returns the complete deterministic result for premium subscribers
Expected result
Use this output to verify values, aliases, ordering, and row count.
| user_id | plan | monthly_fee |
|---|---|---|
| 1 | Premium | 20 |
| 4 | Premium | 20 |
| 7 | Premium | 20 |
Learn the concepts behind this answer
Strengthen your understanding with these targeted learning topics:
Continue practicing
Explore related company challenges
Google
Independent Google-style search, advertising, user-engagement, and video-product SQL practice.
Meta
Independent Meta-style social-product, engagement, content, community, messaging, and advertising SQL practice.
Airbnb
Independent Airbnb-style marketplace, booking, listing, payment, review, and guest analytics SQL practice.
Return to the complete interview preparation experience.