oracle group by 使用

时间:2022-12-01 05:39:12

SELECT supplier_id, max(evidence_date) AS evidence_date,max(TD_SUPPLIER_EVIDENCE_INFO_ID) AS TD_SUPPLIER_EVIDENCE_INFO_ID
FROM TD_SUPPLIER_EVIDENCE_INFO
GROUP BY supplier_id
ORDER BY evidence_date desc;

使用group by 查询字段需要 max min avg count sum 等方法控制