TAG BADGES only awarded to ONE USER


Please login or register to vote for this query.

(click on this box to dismiss)

History of Science and Math

Q&A for people interested in the history and origins of science and mathematics

  name as [Tag Badge],
  min([Date]) as [Date Awarded],
  min(class) as class
into #b from badges
where tagbased='true'
group by name, userid
having count(*)=1

  format([Date Awarded],'yyyy-MMM-d ddd'),
  case class when 1 then 'gold' when 2 then 'silver' else 'bronze' end as [Type],
  [Tag Badge] as TagName,
  t.[count] as [Total Posts in Tag],
  userid as [User Link],
  format(reputation,'#,##0') as Reputation,
  year(u.creationdate) as [Joined],
from #b b left join users u on b.userid=u.id left join tags t on t.tagname=b.[Tag Badge]
order by class desc, [Date Awarded] desc

Enter Parameters

Switch to meta site
loading Hold tight while we fetch your results