oracle group by 使用

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 等方法控制

posted @ 2014-03-11 17:38  醉洒脱  阅读(400)  评论(0编辑  收藏  举报