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) select * from c1