minifix (group by for orderNumber, for Postgresql 8.4)