Strangely I noticed that some users have been in the system for over a year and have over 200 reputation but still do not have the Yearling badge awarded. This query returns those users.
Q&A for anime and manga fans
-- Users with over 200 reputation and 1 year on system without yearling badge -- Strangely I noticed that some users have been in the system for over a year and have over 200 reputation but still do not have the Yearling badge awarded. This query returns those users. DECLARE @yearAgo DATETIME SET @yearAgo = dateadd(day,-400,getdate()) select u.Id As [User Link], u.Reputation, u.CreationDate from Users u where u.CreationDate < @yearAgo and u.Reputation > 199 and u.Id not in (select UserId from Badges b where b.Name = 'Yearling')