# Question Problem 11 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? Figure P13.11 shows the result of the query. TM MONTH P CATEGORY NUMPROD TOTSALES P CODE 13-02/12 CATI CATI STAT CAN NULL CAT 1611-00 NE Some records omitted in output shown 18 CATE SM11277 NULL CATA 10 NULL NULL 13 101221 NULL NULL Task Complete Problem 11 above. > Below is the Schema for the database: FIGURE 13.20 SALECO SNOWFLAKE SCHEMA DWVENDOR PKV CODE DWREGION PK REG ID REG_NAME 회 DWTIME PK TID TM YEAR TM_MONTH TM_DAY TM QTR V_NAME VAREACODE V STATE DWCUSTOMER PK CUS_CODE CUS_LNAME ++ CUS_FNAME CUS INITIAL CUS_STATE FK1REG_ID DWSALESFACT PK.FK2 IMID PKFK1CUS CODE OPKFKSP_CODE SALE_UNITS SALE PRICE DWPRODUCT PKP_CODE P_DESCRIPT P CATEGORY FK1 CODE

YMEV61 The Asker · Computer Science

Transcribed Image Text: Problem 11 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? Figure P13.11 shows the result of the query. TM MONTH P CATEGORY NUMPROD TOTSALES P CODE 13-02/12 CATI CATI STAT CAN NULL CAT 1611-00 NE Some records omitted in output shown 18 CATE SM11277 NULL CATA 10 NULL NULL 13 101221 NULL NULL Task Complete Problem 11 above. > Below is the Schema for the database: FIGURE 13.20 SALECO SNOWFLAKE SCHEMA DWVENDOR PKV CODE DWREGION PK REG ID REG_NAME 회 DWTIME PK TID TM YEAR TM_MONTH TM_DAY TM QTR V_NAME VAREACODE V STATE DWCUSTOMER PK CUS_CODE CUS_LNAME ++ CUS_FNAME CUS INITIAL CUS_STATE FK1REG_ID DWSALESFACT PK.FK2 IMID PKFK1CUS CODE OPKFKSP_CODE SALE_UNITS SALE PRICE DWPRODUCT PKP_CODE P_DESCRIPT P CATEGORY FK1 CODE
More
Transcribed Image Text: Problem 11 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? Figure P13.11 shows the result of the query. TM MONTH P CATEGORY NUMPROD TOTSALES P CODE 13-02/12 CATI CATI STAT CAN NULL CAT 1611-00 NE Some records omitted in output shown 18 CATE SM11277 NULL CATA 10 NULL NULL 13 101221 NULL NULL Task Complete Problem 11 above. > Below is the Schema for the database: FIGURE 13.20 SALECO SNOWFLAKE SCHEMA DWVENDOR PKV CODE DWREGION PK REG ID REG_NAME 회 DWTIME PK TID TM YEAR TM_MONTH TM_DAY TM QTR V_NAME VAREACODE V STATE DWCUSTOMER PK CUS_CODE CUS_LNAME ++ CUS_FNAME CUS INITIAL CUS_STATE FK1REG_ID DWSALESFACT PK.FK2 IMID PKFK1CUS CODE OPKFKSP_CODE SALE_UNITS SALE PRICE DWPRODUCT PKP_CODE P_DESCRIPT P CATEGORY FK1 CODE