#8

Rank Games by Revenue

A video-game store is curating a "Best Sellers" shelf and wants its catalog ranked by revenue. For each game, compute total revenue (quantity * price across all order lines) and assign a rank — 1 to the top earner, 2 to the next, and so on. Output the title, revenue, and rank, sorted by rank.

Expected output sample

This is what a correct answer looks like — its row count is its own, it doesn't have to match the schema tables.

ranktitletotal_revenue
1Neon Drift209.93
2Stellar Conquest99.98
3Mystery Manor74.97
Sberbank

Your query result will appear here