with tids as (select distinct name from badges where tagb...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Drones and Model Aircraft Meta

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 c3.name, c1s, c2.c2s, c3.c3s
from c1 right outer join c2 on c1.name = c2.name 
right outer join c3 on c3.name = c2.name
order by c3s, c2s, c1s desc

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results