i would like to ask some help from you guys. i am making a daily sales report and got some problem with GROUP BY clause.
here is the sample table:
ItemName Quantity Price
===========================
ItemA 5 150.00
ItemB 6 100.00
ItemA 2 125.00
ItemD 1 110.00
ItemB 1 100.00
ItemD 3 110.00
and i want to have results formatted like this:
RESULT:
ItemName Quantity Price
=============================
ItemA 2 125.00
ItemA 5 150.00
ItemB 7 100.00
ItemD 4 110.00
As you can see, ItemA occurs twice since it differs in Price.
1 Answer