Question: 4. Create a table showing the total sales generated in each of the bonus tiers. You will need to use select into command. Use query
4. Create a table showing the total sales generated in each of the bonus tiers. You will need to use select into command. Use query created for the previous question as a subquery to accomplish this task.
(previous query)
USE AdventureWorks2019
SELECT
BusinessEntityID,
TerritoryID,
SalesYTD,
CASE
WHEN SalesYTD <= 100000 THEN 1000
WHEN SalesYTD <= 200000 THEN 2500
WHEN SalesYTD <= 300000 THEN 5000
ELSE 10000
END AS BonusAmount
FROM
Sales.SalesPerson;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
