Top Score Open Questions who's Title or Tags match specific Keywords

1

Please login or register to vote for this query.

(click on this box to dismiss)

Search for all open questions with keywords in either the title or tags ordered by score.

Stack Overflow

Q&A for professional and enthusiast programmers

-- Top Score Open Questions Title Or Tags Matching Keywords
-- Search for all open questions with both keywords in either the title or tags sorted by top score

DECLARE @QTagOne VARCHAR(255) = ##KeywordOne:string##;
SET     @QTagOne              = '%' + LTRIM(RTRIM(@QTagOne)) + '%';
DECLARE @QTagTwo VARCHAR(255) = ##KeywordTwo:string##;
SET     @QTagTwo              = '%' + LTRIM(RTRIM(@QTagTwo)) + '%';

SELECT     Id AS [Post Link], Score, Tags
FROM       Posts
WHERE      PostTypeId = 1
AND        ((Tags LIKE @QTagOne AND Tags LIKE @QTagTwo) OR (Title LIKE @QTagOne AND Title LIKE @QTagTwo))
AND        ClosedDate IS NULL
ORDER BY   Score DESC

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results