Comments that say thanks to my post

1

Please login or register to vote for this query.

(click on this box to dismiss)

Wholesome comments to me (no mean comments)

Monero Meta

Q&A about the site for developers and users of the secure, private and untraceable cryptocurrency Monero

declare @userID int = ##UserID?9449426##
declare @userName nvarchar(max)

-- Find and get the user name based on user ID
SELECT TOP 1 @userName = DisplayName
FROM Users
WHERE Id = @userId

-- Find all answers from this user that have any comments
SELECT *
INTO #myPosts
FROM Posts
WHERE OwnerUserId = @userID
  AND PostTypeId = 2
  AND CommentCount > 0
  AND DeletionDate IS NULL


-- Find all comments of this user posts that show gratitude.
SELECT c.Text AS Comment,
       c.Id AS [Comment Link],
       c.UserId AS [User Link],
       p.Id AS [Post Link]
FROM Comments c
JOIN #myPosts p ON p.Id = c.PostId
WHERE c.UserId != @userId
 AND (LOWER(Text) LIKE '%thanks%'
   OR LOWER(Text) LIKE '%thank you%'
   OR LOWER(Text) LIKE '%thnx%'
   OR LOWER(Text) LIKE '%thx%'
   OR LOWER(Text) LIKE '%wow%'
   OR LOWER(Text) LIKE '%mvp%'
   OR LOWER(Text) LIKE '%made my day%'
   OR LOWER(Text) LIKE '%best answer%'
   OR LOWER(Text) LIKE '%savage%')

Enter Parameters

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