Chapter 4 Exercise 14

14. Which day of the week (Sun/Mon/) has the highest total sales value? Hint: In Access use the function Format(date, "ddd") to obtain the day of the week.

SELECT Format([SaleDate],"ddd") AS Weekday,
Sum([Quantity]*[SalePrice]) AS SalesValue
FROM Sale INNER JOIN SaleItem ON Sale.SaleID = SaleItem.SaleID
GROUP BY Format([SaleDate],"ddd")
ORDER BY Sum([Quantity]*[SalePrice]) DESC;