I am trying to product a sales report that shows for example
itemid salesdate qty_sold
item1 1/9/14 3
item1 1/9/14 2
item1 1/9/14 5
item2 2/9/14 2
item3 4/9/14 1
The problem I have is because the sales of for example 3 on Monday could be made up of 1-3 different sales orders, I can only get it to show multiple lines and not group together as I want.
I want to product a report which shows item id, date of purchase and total sold on that day, not a list of all sales to include that item if that makes sense?
thanks in advance
more details:
SELECT st.orderdate, sl.itemid, sl.qty
FROM salestable st
INNER JOIN salesline sl
ON salestable.salesid = salesline.salesid
currently, it displays results as follows.
OrderDate ItemId Qty
1/1/14 101 1
1/1/14 101 3
1/1/14 102 1
I would like to group the rows if possible to only show 1 line per date & itemid. it doesn't work because they are obviously separate lines in the database as they have different order numbers etc.
OrderDate ItemId Qty
1/1/14 101 4
1/1/14 102 1
2/1/14 102 5
2/1/14 101 2
If it cant be done, then a grouping type within report builder would suffice but I cant see a way of doing it!
Cheers