日期:2014-05-18 浏览次数:20647 次
;with t1 as ( select row_number() over (partition by [业务员] order by [业绩] desc) as R, [业务员],[客户],[业绩] from [表] )t2 as ( select [业务员],[客户],[业绩] from t1 where r <=10 ) select * from t2 /*前10名 客户*/ --剩下的楼主自己解决吧
------解决方案--------------------
http://topic.csdn.net/u/20090406/21/d801c681-3187-42f3-ab1a-caa9124a9074.html?67857