日期:2014-05-16 浏览次数:20657 次
使用row_number over......排重
select * from(
select t.fkrsfzh,t.fkrxm, row_number() over(partition by t.fkrxm order by fkrxm desc) pm from?tableName t
)T2 where T2.pm=1
使用wm_concat在group by后将某一列进行连接
select count(*),fkrsfzh,wm_concat(fkrxm)
from tableName group by fkrsfzh?