Search ⌘K
LinkedIn
LinkedIn

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.

Foundations Track
Easy
15 min
query basics

Company labels are directional practice context, not official interview guidance.

Timer 00:00
Back to practice

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 VARCHAR(30
drug
AsterNovaRx4200.002200.00
BeaconNovaRx3800.002500.00
CitrineHealthLab5100.002400.00
DeltaHealthLab2600.001800.00
EmberCarePlus4700.002600.00
Editor
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.