You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
415 B
Plaintext
9 lines
415 B
Plaintext
SELECT PART_NO AS Part_Number,PART_DESC AS Part_Description,SUM(NET_AMOUNT) AS Sales,SUM(INVOICED_QTY) AS Quantity
|
|
FROM CUST_ORD_INVO_STAT t
|
|
Where
|
|
TRUNC(INVOICE_DATE) between TO_DATE('&DATE_FROM','YYYY-MM-DD') AND TO_DATE ('&DATE_TO','YYYY-MM-DD')
|
|
AND COMPANY LIKE '%&Company%'
|
|
AND AUTHORIZE_CODE LIKE '%&AuthorizeCode%'
|
|
GROUP BY PART_NO,PART_DESC
|
|
ORDER BY Quantity DESC, Sales DESC
|
|
FETCH NEXT 10 ROWS ONLY |