摘要: 用sql查询每个分组中amount最大的前两条记录:SELECT *FROM HW trWHERE(SELECT COUNT(*) FROM HW WHERE tr.DEPID=DEPID AND AMOUNT>tr.AMOUNT)< 2ORDER BY DEPID, TR.AMOUNT DESC应... 阅读全文
posted @ 2015-02-09 19:01 喵尾景虎 阅读(294) 评论(0) 推荐(0) 编辑