Hi, I have a data table shown in the image above. I want a result whereby the code finds each person's total (sum) sales amount by day. eg, for Salesperson Frank, it returns his sales for Monday, Tuesday, Wednesday, etc.
Thanks
SELECT SalesPerson, Week, Day, SUM(SalesAmount)
FROM myTABLE
GROUP BY SalesPerson, Week, Day
ORDER BY SalesPerson, Week
Use a day number field if you want to order by week day.
If you don't want to group by week, suppress Week
field from previous query.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.