SELECT department_area_code 地区,round(BIll_ssum,-1) 客单价, count(1) 数量 FROM BI_RETAIL r INNER JOIN BI_DEPOT d ON r.SET_DEPARTMENT_ID=d.DEPARTMENT_ID WHERE BIll_ssum>0 AND to_char(BILL_SUM_SUREDATE,'yyyy-mm')=to_char(SYSDATE,'yyyy-mm') GROUP BY department_area_code,round(BIll_ssum,-1) --HAVING count(1) >300 ORDER BY department_area_code,数量 DESC |