Q&A about the site for active researchers, academics and students of physics
SELECT myUser.Id AS [User Link], myUser.Tenure, count(myAnswer.id) AS [Ans_before] FROM (SELECT DISTINCT Users.Id, DATEDIFF(day,Users.CreationDate, GETDATE()) as [Tenure] FROM Users inner join Posts p on p.owneruserid = Users.Id inner join Votes v on p.Id = v.postid WHERE (p.PostTypeId =2 AND v.votetypeid =2 AND ((AboutMe LIKE '%buymeacoffee%') OR (AboutMe LIKE '%ko-fi%')) AND reputation > 10)) AS myUser left join (SELECT p.Id, p.PostTypeId, p.CreationDate, p.OwnerUserId FROM Posts as p WHERE p.CreationDate BETWEEN DATEADD(week,-2,'##Date1?2021-10-01##') AND '##Date1?2021-10-01##' AND p.PostTypeId =2 ) AS myAnswer on myUser.Id = myAnswer.OwnerUserId GROUP BY myUser.Id, myUser.Tenure ORDER BY myUser.Id