SQL practice: Running Totals and Frames

Chapter 25 · 9 questions · included in full access

  1. Question 1 · easy

    Show a running total of quantity in order_items, ordered by order_item_id.

    Solve it in your browser
  2. Question 2 · easy

    Show each product's price and what percent it is of all prices added together.

    Solve it in your browser
  3. Question 3 · medium

    Show a running total of orders per month, over time.

    Solve it in your browser
  4. Question 4 · medium

    For each branch, show a running total of its revenue ordered by date.

    Solve it in your browser
  5. Question 5 · medium

    Show monthly order counts with a 3-month moving average.

    Solve it in your browser
  6. Question 6 · medium

    Show each employee's salary and what percent of the total payroll it is.

    Solve it in your browser
  7. Question 7 · medium

    Show branch revenues with a running cumulative percentage, biggest branch first. (This is a Pareto / 80-20 chart.)

    Solve it in your browser
  8. Question 8 · hard

    Show each product with its revenue and its category's total revenue beside it.

    Solve it in your browser
  9. Question 9 · hard

    Show revenue per order date with a running total. Every row shows the same grand total. Fix it.

    Solve it in your browser

These questions are part of full access.

The first chapters of every track are free. Full access is a one-time payment.

See pricing