You need to include only non-aggregate columns in the GROUP BY statementSELECT co.reference_id as Order_Number, co.order_id as Pick_ID, count(distinct ct.art) as Articles, sum(ct.ordered_qty * a.nopa) as Packages, sum(a.weig)/1000 as Weight, sum(a.avol)/100000 as Volume, sum(ct.ordered_qty) as Ordered_qty, sum(ct.picked_qty) as Picked_qty, sum(ct.checked_qty) as Checked_qtyFROM alpha co, beta ct, tablea aWHERE co.order_id = ct.order_id and ct.art = a.artGROUP BY co.order_reference_id, co.order_id
MadhivananFailing to plan is Planning to fail