All tasks

Calculate Running Sales Totals by Salesperson

Expert

Write a query that calculates the running total of sales for each salesperson. Use CTE to join sales, products, and employees tables. Join on salesperson (name from employees), product_id (from products). Order by sale_date within each salesperson. Output salesperson, product_name, sale_date, amount, and running_total.

Category
Window Functions
Estimated time
~20 min
Databases
PostgreSQLGreenplumMS SQL Server
Tags
window functionsctejoinsrunning totalsada-challengeai-generatedada-challengeexpert

Sign in to solve

Start Solving