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

Article Details

Article ID:
284
Category:
Date added:
2021-10-15 02:24:17
Views:
139
Rating (Votes):
(74)