select id,service,name FROM service GROUP BY name,service
select count(*) FROM service GROUP BY name,service
select count(*) from(select count(*) FROM service GROUP BY name,service) s