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 .

7 Comments

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

  1. U have missed this answer too

    ReplyDelete
    Replies
    1. Sorry I have not found customer(id) column in customers table , so I cannot write its answer : (

      If you found then please comment . !!!!

      Delete
  2. Can you upload this question

    ReplyDelete
  3. I think you can consider customer ID as customer name from customers, this may help (think so)

    ReplyDelete
  4. SELECT 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;

    ReplyDelete

Post a Comment

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

Previous Post Next Post