日期:2014-05-16 浏览次数:20884 次
SELECT t.*, CASE WHEN t.s IN ('全国', '北十', '南21') THEN NULL ELSE ROW_NUMBER() OVER(PARTITION BY CASE WHEN t.s IN ('全国','北十','南21') THEN NULL ELSE 1 END ORDER BY t.rs DESC) END FROM t ORDER BY 2 DESC,3 NULLS FIRST