civilwarjunky
IS-IT--Management
I am somewhat new to SQL and need help grouping my qurrey.
select Trandate as 'Order Date',
artran.invtid as 'item #',inventory.descr as 'discription',artran.qty as 'Qty'
from artran,Inventory,Customer,Salesperson,custclass
where artran.invtid=Inventory.invtid
and artran.custid=customer.custid
and custclass.classid=customer.classid
and customer.billstate='ca'
and not customer.custid in ('calmkt','oosmkt,CALREP')-- These codes are for in house use
and trandate between '2004-07-01' and '2005-01-12'
and Salesperson.slsperid=*artran.slsperid
order by artran.Invtid
I would like to group everything by item number and have a total quantity for each item. Can you help
select Trandate as 'Order Date',
artran.invtid as 'item #',inventory.descr as 'discription',artran.qty as 'Qty'
from artran,Inventory,Customer,Salesperson,custclass
where artran.invtid=Inventory.invtid
and artran.custid=customer.custid
and custclass.classid=customer.classid
and customer.billstate='ca'
and not customer.custid in ('calmkt','oosmkt,CALREP')-- These codes are for in house use
and trandate between '2004-07-01' and '2005-01-12'
and Salesperson.slsperid=*artran.slsperid
order by artran.Invtid
I would like to group everything by item number and have a total quantity for each item. Can you help