Q&A for professional and enthusiast programmers
select U.Id as [User Link], LP.LastPostDate from Users U inner join Badges B on B.UserId = U.Id inner join ( select P.OwnerUserId, max(P.CreationDate) as LastPostDate from Posts P group by P.OwnerUserId ) LP on LP.OwnerUserId = U.Id where B.Class = ##BadgeClass?1## and B.TagBased = 1 and B.Name = '##Tag?haskell##' and datediff(day, LP.LastPostDate, getdate()) >= ##MinElapsedDays?0## and datediff(day, LP.LastPostDate, getdate()) <= ##MaxElapsedDays?3650000## order by LP.LastPostDate desc