1. Using the Sales.SalesOrderHeader table, create an SQL query to produce the following output. HINT: Use CAST().
2. Retrieve the following columns (as shown in the output below) for customers who ordered more than 30 items (ItemID). Also, list the average quantity ordered. HINT: This query uses the Sales.Customer, Sales.SalesOrderHeader, Person.Person, and Sales.SalesOrderDetail tables.
3. Retrieve the average price and the sum of year-to-date sales, grouped by product ID and special offer ID in Sales.SalesOrderDetail table.
4. Retrieve total sales and the discounts for each product using Production.Product and Sales.SalesOrderDetail. Descending order by ProductName.
5. Update the list price of the product (Production.Product) by 10% where product sub‐ category (Production.ProductSubcategory) is socks.
6. Using a subquery, list Product ID’s, including Names and ProductNumbers, that have no subcomponents. This query uses the Production.Product and Production.BillOfMaterials tables.