Q. List the sum of the totals of orders where this sum is greater than $1000 grouped by customer (id) and state and ordered by state.
Consider this table --
Answer =
Sorry I have not found customer(id) column in customers table , so I cannot write its answer : (
If you found then please comment .
U have missed this answer too
ReplyDeleteSorry I have not found customer(id) column in customers table , so I cannot write its answer : (
DeleteIf you found then please comment . !!!!
J
What ?????
DeleteCan you upload this question
ReplyDeleteI think you can consider customer ID as customer name from customers, this may help (think so)
ReplyDeleteSELECT C.customer_id , C.state, SUM(O.Amount) from Customers C, Orders O where C.customer_id = O.customer_id GROUP BY C.customer_id , C.state HAVING SUM(O.Amount)>1000 ORDER BY C.state;
ReplyDeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )