Q. Which SQL statement lets you find the sales amount for each store ?

(a) SELECT STORE_ID, SUM(SALES_AMOUNT) FROM SALES ;

(b) SELECT STORE_ID,  SUM (SALES_AMOUNT ) FROM SALES ORDER BY STORE_ID;

(c) SELECT STORE_ID, SUM(SALES_AMOUNT) FROM SALES GROUP BY STORE_ID;

(d) SELECT STORE_ID, SUM(SALES_AMOUNT) FROM SALES HAVING UNIQUE STORE_ID ;


Consider  this table --




 

You can understand by seeing this video ---


Answer =

(c) = SELECT STORE_ID, SUM(SALES_AMOUNT) FROM SALES GROUP BY STORE_ID;

2 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post