select a.test,b.* from (select @y:=@y+1 as test,a.* from (select * from resourcecenter.cm_identify_relation a group by a.issue_party ) a,(select @y:=0) d order by issue_party) a,
resourcecenter.cm_identify_relation b
where a.issue_party=b.issue_party order by b.issue_party
先在表中創建 字段a 的分組排序 並自增序號,
然后使用原來的表 進行根據字段a賦值,並顯示加的序號列