table tbl1
id,name
champ id,name
id = 1 nom = a
id = 1 nom = a
id = 1 nom = w
id = 1 nom = f
id = 2 nom = c
id = 2 nom = a
comment peut-on get le numéro de champ répété. id = 1, nom = a ==> 2
c'est simple
select id, name, count(*) from table group by id, name