我正在使用oracle開發人員,並且我有以下查詢。我需要完成這個查詢的最後一件事是因爲它帶來了同一個客戶的許多實例,我只想看到每個客戶的一個結果。任何想法根據特定要求限制SQL的記錄數
SELECT CUST_FNAME, CUST_LNAME, CUST_STREET, CUST_CITY, CUST_STATE, CUST_ZIP
FROM LGCUSTOMER, LGBRAND , LGINVOICE
WHERE BRAND_NAME = 'FORESTERS BEST'
AND lginvoice.INV_DATE BETWEEN TO_DATE('20110715','YYYYMMDD') AND TO_DATE('20110731','YYYYMMDD')
ORDER BY CUST_STATE, CUST_LNAME, CUST_FNAME;