Q&A for programmers
with subquery as (select votetypeid, count(*) as number
where bountyamount is not null
group by votetypeid)
select name, number as "number of votes"
inner join votetypes
on subquery.votetypeid = votetypes.id
Error: looks like you typed in the wrong words - try again