Martin Kuria writes: > Hi again I have this problem when I try to run this query, how can I rewrite > it for it to work. > > SELECT o.item_order_num,SUM(o.item_quantity + o.item_product_id) As total, > o.item_status > FROM soko_product p, soko_ordered_item o > WHERE p.product_id = o.item_product_id > GROUP BY o.item_order_num > ORDER BY o.item_order_num; > > Error: Attribute o.item_status must be GROUPED OR USE IN an aggregate > function
Add o.item_status to the GROUP BY clause. -- Peter Eisentraut [EMAIL PROTECTED] ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster