摘要:
--方法1.求分组数据中最小的前三条SELECT t1.*FROM dbo.info t1WHERE t1.name IN ( SELECT TOP 3 t2.name FROM info t2 WHERE t2.class = t1.class ORDER BY t2.score ASC ) ORDER BY t1.class DESC ,t1.score asc--方法2.求分组数据中最小的前三条SELECT * FROM(SELECT * , ( SELECT COUNT(1) FROM dbo.info t2 WHERE t1.score > t2.score AND t1.cl 阅读全文
posted @ 2013-06-03 15:16
qanholas
阅读(1194)
评论(0)
推荐(0)