Curious Inquisitive Socratic Badge Progress


Please login or register to vote for this query.

(click on this box to dismiss)

Calculates the number of days a user has with questions that have upvotes and there are no downvoted questions and displays progress toward each of the badges


Q&A for writers/artists using science, geography and culture to construct imaginary worlds and settings

OwnerUserID as [User Link],
case when days >= 5 then 'Yes' else concat(days, '/', 5) end as Curious,
case when days >= 30 then 'Yes' else concat(days, '/', 30) end as Inquisitive,
case when days >= 100 then 'Yes' else concat(days, '/', 100) end as Socratic
from (select count(*) as days, OwnerUserID
from (select
  OwnerUserID as OwnerUserID, 
  CONVERT(VARCHAR(10), creationDate, 111) as creationDay,
  sum(case when score > 0 then 1 else 0 end) as up,
  sum(case when score < 1 then 1 else 0 end) as down
from Posts
where PostTypeId = 1
group by CONVERT(VARCHAR(10), creationDate, 111), OwnerUserID 
) x
where up > 0 and down = 0 
group by OwnerUserID
) y order by days desc

Enter Parameters

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