ryan010101
Technical User
The below query is not working. I have a table of order contents. Each record in the table is a line item. I need to add up the quantities for each order and display each order whose total quantity is >= 100. Any suggestions?
thanks
Ryan
Code:
SELECT itm_ord_num, Sum( qty ) AS Qty1, oper_id3, vfy_date
FROM carton_contents
WHERE vfy_date >= '2004-12-06'
AND vfy_date <= '2004-12-06'
AND Qty1 >=100
GROUP BY itm_ord_num
ORDER BY Qty1 DESC
LIMIT 0 , 30
thanks
Ryan