Netflix-style Company ChallengeBeginnerVerified answerSQLite live

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_idINTEGER
  • user_idINTEGER
  • planVARCHAR(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_id

Why 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_idplanmonthly_fee
1Premium20
4Premium20
7Premium20

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.