Select aa.*,bb.repeat from 表 aa
join
(Select b,c,d,min(id),count(*) as repeat from 表 group by b,c,d) bb
on aa.id = bb.id
join
(Select b,c,d,min(id),count(*) as repeat from 表 group by b,c,d) bb
on aa.id = bb.id
join
(Select b,c,d,min(id) as id,count(*) as repeat from 表 group by b,c,d) bb
on aa.id = bb.id