Streamhub's growth team is reviewing subscription tier distribution ahead of a pricing strategy meeting.
Write a query to return every registered user's ID, name, and current subscription plan.
Assumptions:
- The
userstable contains every registered Streamhub user. - Each user has an
id, aname, and aplan(the subscription tier they're currently on).
Output:
- One row per user, with columns
id,name, andplan.
Schema · analytics 5 tables
Run previews · Check grades
Write a query, then run it to see results here.
Worked solution Try it yourself first
SELECT
id,
name,
plan
FROM
users The shape
FROM users reads the full Streamhub user base, and the three columns in the SELECT list shape every row into the slice the growth team needs to look at tier distribution: who the user is and which plan they're on.
Clause by clause
SELECT id, name, planreturns three columns per row, in source order. The identifier comes first so individual users can be cross-referenced if the growth team wants to drill into a specific account; the name makes the result human-readable; the plan is the column the pricing-strategy meeting actually cares about.FROM usersis the row source — the table of every registered Streamhub user. There's noWHEREclause, so every registered user comes back, which is the right grain for a distribution analysis: you can't see how the tiers split if some users are missing from the result. The shape recurs across SaaS tables. Whether the data is users, products, accounts, or events, the pattern is the same — name the table inFROM, name the columns inSELECT, and let the result land at the grain of one row per record.
Why this and not SELECT *
The users table likely carries more columns than these three — email addresses, signup timestamps, billing references. None of those belong in a tier-distribution analysis; they'd just make the result wider without making it more useful. Returning the three columns the growth team needs keeps the dataset focused on the question being asked. A SELECT * query would also pull personally identifying fields like email addresses into a meeting deck that doesn't need them, which is the kind of unnecessary exposure tight column lists quietly prevent.
You practiced reading rows from a SaaS user table — same SELECT … FROM shape as any other table. The pattern doesn't care what the data is about, only which columns you ask for.