w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
SQL (Access), subquery: Find saleperson that exceeds $2000 in sales by month and what date in the month sales exceed $2000

So you've got running-total in your tags - what did you try?

I would create a temporary table and generate the running total, and derive the month using the 'Month' function, and also derive the day of the month. If you sort by month and day each month's data will give you a running total that is what you want. This means you go month-by-month, and calculate the temp table for all salespersons.

It's not super elegant, but it'll give you what you want.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.