Upv Two weeks

0

Please login or register to vote for this query.

(click on this box to dismiss)

Robotics

Q&A for professional robotic engineers, hobbyists, researchers and students

SELECT myUser.Id, count(myUpvote.Id) AS [Upvote_before]
  FROM (SELECT DISTINCT Users.Id
    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 v.Id AS voteID, v.CreationDate, u.Id
    FROM votes v
   INNER JOIN posts p
    ON v.PostId = P.Id 
   INNER JOIN users u
    ON P.OwnerUserId = u.Id
   WHERE (v.CreationDate BETWEEN DATEADD(week,-2,'##Date1?2021-10-01##') AND '##Date1?2021-10-01##')
    AND p.PostTypeId =2
    AND v.VoteTypeId = 2
  ) AS myUpvote
  on myUser.Id = myUpvote.Id
  GROUP BY myUser.Id
  ORDER BY myUser.Id

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results