Writing Queries that Aggregate Data

Part 1 Using WideWorldImporters database create a query that returns the StockItemID from the StockItems table in the Warehouse schema, the OrderLineID, Quantity, and UnitPrice from the OrderLines table in the Sales schema, and the ColorName from the table Colors in the Warehouse schema. Take a screen shot of the SQL windows and results and paste it here.

Part 2 Rewrite the query from Part 1 returning the ColorName and the total of all sales (defined as Quantity times UnitPrice), the average of all sales, and the total number of sales made. Use appropriate aliases for each of the aggregatge columns. Take a screen shot of the SQL windows and results and paste it here.

Part 3 Rewrite the query from Part 2 returning the ColorName, the Year part of OrderDate from the table Orders in the Sales schema and the total of all sales (defined as Quantity times UnitPrice), the average of all sales, and the total number of sales made. Use appropriate aliases for each of the aggregatge columns. Only return rows that have a total number of sales of 5000 or more and sort the results by total sales from highest to lowest within the year part of OrderDate from newest to oldest. Take a screen shot of the SQL windows and results and paste it here.

For professional help in programming assignment, simply consider homework help service at essay-writing.com.

Do My paper price
Pages (550 words)
Approximate price: -