DISTINCT to enumerate the categorical values in a column
Quick sanity-check before I write tomorrow's forecast report. Give me every distinct `stage` that appears in `revops_opportunities`. Just the one column. Raw values — don't normalize, I want to see exactly how Salesforce stored them. If Marketing is pushing some non-standard stage name through on inbound leads I want to catch it now.
| Column | Type | Key |
|---|---|---|
| opportunity_id | INT | PK |
| account_id | INT | FK → revops_accounts |
| owner_user_id | INT | FK → revops_users |
| name | TEXT | |
| stage | TEXT | |
| amount | REAL | |
| close_date | TEXT | |
| created_date | TEXT | |
| is_closed | INT | |
| is_won | INT |
Each hint you reveal reduces the XP you can earn. Try the query first.
Stages repeat across thousands of opportunity rows — you want the unique list, not a count. Think about the SQL keyword that returns only distinct values.
Do NOT apply `LOWER()` or `TRIM()` — Lina wants raw stored values so casing drift from Salesforce picklist imports surfaces.
You should see 7 rows covering the full sales pipeline from prospecting through closed.