Reference no: EM132413506
Using the data provided in the SaleCo_DW database, solve the following problems.
1. What is the SQL command to list the total sales by customer and by product, with subtotals by customer and a grand total for all product sales?
2. What is the SQL command to list the total sales by customer, month and product, with subtotals by customer and by month and a grand total for all product sales?
3. What is the SQL command to list the total sales by region and customer, with subtotals by region and a grand total for all sales?
4. What is the SQL command to list the total sales by month and product category, with subtotals by month and a grand total for all sales?
5. What is the SQL command to list the number of product sales (number of rows) and total sales by month, with subtotals by month and a grand total for all sales?
6. What is the SQL command to list the number of product sales (number of rows) and total sales by month and product category with subtotals by month and product category and a grand total for all sales?
7. What is the SQL command to list the number of product sales (number of rows) and total sales by month, product category and product, with subtotals by month and product category and a grand total for all sales?
Using the answer to Problem 6 as your base, what command would you need to generate the same output but with subtotals in all columns? (Hint: Use the CUBE command).
Attachment:- Chapter 13-SaleCo-DW.rar