![]() ![]() UnitPrice )) AS Total, CASE WHEN SUM ( ( od. This is a simple query using GROUP BY to aggregate data for each order. Order Subtotals For each order, calculate a subtotal for each Order (identified by OrderID). Classify customers based on their sales volumes (Grade A - D) SELECT c. Here is a screenshot of the queries from Access Northwind database. Northwind. master Northwind-Database-Salesdata/Queries.sql Go to file Cannot retrieve contributors at this time 114 lines (102 sloc) 3.28 KB Raw Blame SQL queries - Explore the dataset 1. Tables added to create the view: Order, Employee territories, Employee, Territories. Please find the Produced query and the results: ![]() This is because One employee ID has multiple territories mapped under him, So the order counts are populated only based on the employee IDs and could not populate it for per territory. This is the same problem I faced when I used my SQL query and also I faced the same in Tableau report. Thanks for the quick response, I have created the view as you have advised, but I am getting the same count for multiple territories.
0 Comments
Leave a Reply. |