Q&A about the site for mechanics and DIY enthusiast owners of cars, trucks, and motorcycles
-- Users in Denmark who answered questions about Objective-C -- Tag1: Tag 1 "Questions include this tag" -- Tag2: Tag 2 "Questions include this tag or [Tag 3]" -- Tag3: Tag 3 "Questions include [Tag 2] or this tag" -- QuestionsDate: Questions Date "Questions dates are from this date forward" -- AnswersDate: Answers Date "Answers dates are from this date forward" -- UsersLastAccessDate: Users Last Access "Users last logged-in date are from this date forward" SELECT ROW_NUMBER() OVER(ORDER BY COUNT(*) DESC, u.Reputation DESC) AS #, u.Id AS [User Link], COUNT(*) AS Answers#, u.Reputation, u.LastAccessDate AS [Last Access] FROM (Posts AS q INNER JOIN Posts AS a ON q.Id = a.ParentId) INNER JOIN Users AS u ON a.OwnerUserId = u.Id WHERE q.Tags LIKE '%'+ ##Tag1:string?objective-c## + '%' AND (q.Tags LIKE '%'+ ##Tag2:string?%## + '%' OR q.Tags LIKE '%'+ ##Tag3:string?%## + '%') AND u.Location LIKE '%[Dd]enmark%' AND q.CreationDate >= ##QuestionsDate:string?2000-01-01## AND a.CreationDate >= ##AnswersDate:string?2000-01-01## AND u.LastAccessDate >= ##UsersLastAccessDate:string?2000-01-01## GROUP BY u.Id, u.Reputation, u.LastAccessDate