date prod class qty
060101 a101 1a 100
060101 a101 1a 100
I would like to have the following:
date prod class qty
060101 a101 1a 200
Any other suggestions would be greatful!!
Thanks in advance
the query to return your desired result would look something like this...
select date, prod, class, sum(qty)
from YourTable
group by date, prod, class
thus what you are saying in this query is aggregate the qty per date, prod, class. So if any of these values are different a new record is created. Thus the same product with two diff. class values would result in two records.
HTH,
Derek
|||Thanks for your help Derek!! I was putting the sum and group opposite of what you said.|||no prob dude, take it easy.
No comments:
Post a Comment