Foundations Track · Easy · 15 min
Highest Profit Drugs
LinkedIn wants a scorecard for highest profit drugs. Return the top 3 drugs by total profit. Output drug and total_profit sorted from highest to lowest profit.
Company labels are directional practice context, not official interview guidance.
Objective
Practice query basics through a LinkedIn-tagged business scenario.
Approach
Use this track to lock in clean query structure, basic filtering logic, and confidence with grouped output.
Company context
Company labels are directional practice context, not official interview guidance.
LinkedIn wants a scorecard for highest profit drugs. Return the top 3 drugs by total profit. Output drug and total_profit sorted from highest to lowest profit.
pharmacy_sales
| drug | |||
|---|---|---|---|
| Aster | NovaRx | 4200.00 | 2200.00 |
| Beacon | NovaRx | 3800.00 | 2500.00 |
| Citrine | HealthLab | 5100.00 | 2400.00 |
| Delta | HealthLab | 2600.00 | 1800.00 |
| Ember | CarePlus | 4700.00 | 2600.00 |
SQL workspace
Run queries against the protected question data, then submit once the result shape looks right.
Sign in to run SQL
Create a free account or sign in before running queries against protected question data.