Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IdProduct Quantity TotalPrice OrderDate
- 0001 1 10 29/09/2014
- 0002 2 40 29/09/2014
- 0001 4 40 29/09/2014
- 0001 2 20 29/09/2014
- 0001 2 20 29/09/2014
- 0001 0002
- 9 2
- 90 40
- select idproduct, sum(quantity), sum(totalprice)
- from your_table
- group by idproduct
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement