SQL SELECT to find orders with high line item volume
finds orders with high number of line items:
SELECT o.ORDNUM,
o.SALESREP, COUNT(*) AS LINECT FROM
FF_ORDHEAD o, FF_ORDITEM i WHERE
o.ORDSTAT <> 'history' AND i.ORDNUM =
o.ORDNUM GROUP BY i.ORDNUM ORDER BY
LINECT DESC