Link to home
Start Free TrialLog in
Avatar of curiouswebster
curiouswebsterFlag for United States of America

asked on

How do I SUM by LOCQTY? It needs a Group By

How do I SUM by LOCQTY? It needs a Group By


select prdcod,warehouse_id,LOCQTY 

from locmas lm

join loczone lz on lm.loccod=lz.loccod

where warehouse_id>0 and LOCQTY>0

order by prdcod,warehouse_id

SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of curiouswebster

ASKER

So, the ones inputted into SUM,AVG,MAX,MIN, in the Select, are aggregating columns? The ones in the where and group by are NON-aggregating columns?

Thanks
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial