SELECT UserId as 'OwnerUserId', Total_Badges = (CAST(COUN...

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
UserId as 'OwnerUserId', Total_Badges = (CAST(COUNT(Id) as float)/16956)*100
  FROM 
Badges
WHERE 
YEAR(Date) <2019
GROUP BY
UserId
HAVING UserId not in (419,
811,1228,1288,2598,3279,13531,16587,19679,50049,50776,59303,100297,
102937,105971,106224,168175,189134,229044,237838,246246,366904,426671,
584192,707111,871050,1252759,1849664,2420979,3956566,
4099593) 
AND UserId %7 = 0 AND COUNT(Id) > 20
ORDER BY
UserId

Enter Parameters

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