🪐 Practice SQL Window Functions | Xorthax's SQL Practice
Learning Pages
How Window Functions Work
Aggregate Window Functions
LEAD / LAG
Percentile & Distribution
Ranking Functions
FIRST / LAST / NTH
Problems
1. Galactic Customer Revenue Breakdown
2. The Interstellar Sales Tracker 9000
3. Top 5 Spenders in the Galactic Bazaar
4. Two Orders Before, Two Orders After: The Price Prophecy
5. Customer Spending, Averaged and Analyzed
6. How Much More Did They Order?
7. Species Spending Champions
8. Five Transaction Trail Tracker
9. Lowest Deals in the Galaxy
10. The Galactic Max Order Hunt
11. The Largest Order in the Galaxy
12. Interstellar Spending Sprees
13. Order Volume, Customer by Customer
14. Currency Trends in 7-Order Windows
15. Champions of Loyalty
16. 30 Days of Distinct Artifacts
17. Order by Order, One by One
18. The First Transaction Initiative
19. Top Suppliers of the Trade Federation
20. Species Revenue Rankings
21. The Peak Stock Protocol
22. Clone Order Detector
23. Top 3 Galactic Bestsellers
24. Species Spending Standings
25. Most Popular Products in the Galaxy
26. Supplier Showdown
27. 5-Transaction Tally Tracker
28. Species Revenue Leaderboard
29. Category Revenue Rankings
30. Order Titans of the Stars
31. Category Spend Royalty
32. First Contact by Category
33. Galactic Spending Tiers
34. Five Tiers of Product Fame
35. Customer Frequency Classes
36. Stock Level Stratification
37. Supplier Pricing Pyramid
38. Species-Based Order Tiers
39. The Rare and the Profitable
40. Species Revenue Classifications
41. The First Order Ever Placed
42. Species Transaction Origins
43. The Pioneer Product in Every Category
44. Loyalty Group Order Milestones
45. The Final Purchase Report
46. The Final Product per Category
47. Species Transaction Wrap-Up
48. Last Fulfillments by Supplier
49. The Second Order Chronicles
50. Almost Famous: Second Place Products
51. The Bronze Revenue Medalists
52. The Fifth Fulfillment
53. The Next Order Countdown
54. Product Pairs in Category Time
55. Future Funds Forecast
56. Species Spending, Shift by Shift
57. Order Histories, One Step Back
58. Reverse Product Lineage
59. Two Transactions Ago...
60. Payment Patterns Revealed
61. Percent Rank: Species Spending Edition
62. Relative Product Popularity
63. Transaction Percentile Tracker
64. Supplier Pricing Percentiles
65. Cumulative Spending by Species
66. Cumulative Category Climb
67. Supplier Price Curves
68. Customer Revenue Trajectory
69. Category Spending Footprint
70. Supplier Performance Matrix
71. Species Revenue Surge
72. Rolling Sales by Category
73. Transaction Trail Analysis
74. Inventory Stack Ranks
75. Order Cadence Explorer
About
Contact
Privacy Policy
Do Not Sell or Share My Info
Most Popular Products in the Galaxy
Tables Used
orderdetails
Column
Type
orderdetailid
bigint
orderid
bigint
productid
bigint
quantity
bigint
unitprice
double precision
currencyid
bigint
products
Column
Type
productid
bigint
name
text
description
text
category
text
price
double precision
supplierid
bigint
stockquantity
bigint
Expected Output
Column
productid
productname
totalquantity
rank
25. Most Popular Products in the Galaxy
Determine which products lead in sales volume across the stars.
Xorthax wants to know which products are the most popular. Rank the products by the total quantity sold across the galaxy.
Write Your Query
Run Query
Show Hint
Show Answer
Next Problem →
Explanation:
This site uses essential cookies to remember your session and progress.
Learn more
.
Got it
Toggle Test
Bootstrap JS is working!