SELECT question.Id, question.Body, question.PostTypeId, ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Motor Vehicle Maintenance and Repair Meta

Q&A about the site for mechanics and DIY enthusiast owners of cars, trucks, and motorcycles

-- 19/05/2024 

-- 2 questions found filtered by title search with article query string
SELECT
    question.Id, question.Body, question.PostTypeId, question.AcceptedAnswerId,
    question.ParentId, question.CreationDate, question.DeletionDate,
    question.Score, question.ViewCount, question.OwnerUserId,
    question.OwnerDisplayName, question.LastEditorUserId, question.LastEditorDisplayName,
    question.LastEditDate, question.LastActivityDate, question.Title, question.Tags,
    question.AnswerCount, question.CommentCount, question.FavoriteCount,
    question.ClosedDate, question.CommunityOwnedDate,
    usr.Id, usr.Reputation, usr.CreationDate, usr.DisplayName,
    usr.LastAccessDate, usr.WebsiteUrl, usr.Location, usr.AboutMe,
    usr.Views, usr.UpVotes, usr.DownVotes, usr.AccountId, 
    (SELECT COUNT(*) FROM Posts as anwser
        WHERE anwser.PostTypeId = 2                      /* 2 = Answer */
        AND anwser.ParentId = question.Id                /* Linking anwser to question */
        AND anwser.OwnerUserId <> question.OwnerUserId   /* answers not given by question owner */
    )   AS DiscussionCount 
FROM Posts question 
    INNER JOIN Users usr ON question.OwnerUserId = usr.Id
WHERE
    question.PostTypeId = 1                        /* 1 = Question */    
      AND question.Title LIKE '%migration%'
    AND question.tags LIKE '%cloud%'   
    AND question.tags LIKE '%migration%'

Enter Parameters

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