Question: Using WideWorldImporters database, create a common table expression that returns two columns, ItemName and TotalSales. The query inside the CTE will return the StockItemName from
Using WideWorldImporters database, create a common table expression that returns two columns, ItemName and TotalSales. The query inside the CTE will return the StockItemName from the table Stockitems in the Warehouse schema and the total sales (Quantity times UnitPrice) for each item from the table InvoiceLines in the Sales schema. Review the tables to determine the joins for the tables. Write a query that returns all rows from the CTE where the total sales is at least 1000 dollars.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
