Advertisement
Guest User

Untitled

a guest
Aug 29th, 2014
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. IdProduct Quantity TotalPrice OrderDate
  2. 0001 1 10 29/09/2014
  3. 0002 2 40 29/09/2014
  4. 0001 4 40 29/09/2014
  5. 0001 2 20 29/09/2014
  6. 0001 2 20 29/09/2014
  7.  
  8. 0001 0002
  9. 9 2
  10. 90 40
  11.  
  12. select idproduct, sum(quantity), sum(totalprice)
  13. from your_table
  14. group by idproduct
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement