Q&A for experienced flyers, pilots, and builders of drones and model aircraft
with tids as (select distinct name from badges where tagbased = 1), c1 as (select name, count(*) as c1s from badges where tagbased = 1 and class =1 group by name), c2 as (select name, count(*) as c2s from badges where tagbased = 1 and class =2 group by name), c3 as (select name, count(*) as c3s from badges where tagbased = 1 and class =3 group by name) select * from c3