DECLARE @UserId INT = 1179925; DECLARE @Tags NVARCHAR(25...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Drones and Model Aircraft Meta

Q&A for experienced flyers, pilots, and builders of drones and model aircraft

-- Replace '123456' with the actual user ID
DECLARE @UserId INT = 1179925;

-- Replace 'python;javascript' with the desired tags (semicolon-separated)
DECLARE @Tags NVARCHAR(255) = 'python';

SELECT
    a.Id AS AnswerId,
    q.Id AS QuestionId,
    q.Title AS QuestionTitle,
    a.Body AS AnswerBody,
    a.Score AS AnswerScore,
    a.ViewCount AS AnswerViewCount,
    a.CreationDate AS AnswerCreationDate,
    a.LastEditDate AS AnswerLastEditDate,
    u.Id AS UserId,
    u.DisplayName AS UserDisplayName,
    u.Reputation AS UserReputation,
    u.CreationDate AS UserCreationDate
FROM
    Posts q
JOIN
    Posts a ON q.Id = a.ParentId
JOIN
    Users u ON a.OwnerUserId = u.Id
WHERE
    a.OwnerUserId = @UserId
    AND CHARINDEX(';'+a.Tags+';', ';'+@Tags+';') > 0
ORDER BY
    a.CreationDate DESC;

Enter Parameters

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