badges per location

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

select case when u.location is null then ''
            else u.location
       end as  location
, count(*)
from users u 
inner join badges b on b.userid = u.id
where b.name ='java'
-- and u.location is not null
-- and u.location not in('','~', '-' )
group by case when u.location is null then ''
            else u.location
       end 
order by count(*) desc

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results