I've refactored my previous question finder my previous question finder, and added multi-tag support, and support for searching for keywords in the question titles. Essentially, what it does is find questions that could be answered based on the following parameters.
I've refactored my previous question finder, and added multi-tag support, and support for searching for keywords in the question titles. Essentially, what it does is find questions that could be answered based on the following parameters.
I've refactored my previous question finder, and added multi-tag support, and support for searching for keywords in the question titles. Essentially, what it does is find questions that could be answered based on the following parameters.
@MinimumQuestionVotes: 1
@MaximumQuestionanswers@MaximumQuestionAnswers: 0
@QuestionTags: 'python beginner'
@TitleContains: 'web'
@MinimumQuestionVotes: 1
@MaximumQuestionanswers: 0
@QuestionTags: 'python beginner'
@TitleContains: 'web'
@MinimumQuestionVotes: 1
@MaximumQuestionAnswers: 0
@QuestionTags: 'python beginner'
@TitleContains: 'web'
Finding questions to answer - Part 2
I've refactored my previous question finder, and added multi-tag support, and support for searching for keywords in the question titles. Essentially, what it does is find questions that could be answered based on the following parameters.
-- @MinimumQuestionVotes - The minimum amount of votes on a question.
-- @MaximumQuestionAnswers - The maximum amount of answers to a question.
-- @QuestionTags - The question's tags. Blank string is a wildcard.
-- @TitleContains - Words in the title. Blank string is a wildcard.
If you feel that any parameters aren't needed, or can be improved, just mention it. I'm open to any suggestions. Anyways, here's the code, and here's the SEDE query link.
-- User parameters for finding questions. Here is
-- a brief description of what each parameter does.
-- @MinimumQuestionVotes - The minimum amount of votes on a question.
-- @MaximumQuestionAnswers - The maximum amount of answers to a question.
-- @QuestionTags - The question's tags. Blank string is a wildcard.
-- @TitleContains - Words in the title. Blank string is a wildcard.
DECLARE @MinimumQuestionVotes INT = ##MinimumQuestionVotes:int?0##;
DECLARE @MaximumQuestionAnswers INT = ##MaximumQuestionAnswers:int?0##;
DECLARE @QuestionTags NVARCHAR(150) = ##QuestionTags##;
DECLARE @TitleContains NVARCHAR(250) = ##TitleContains##;
-- Final results are SELECTed based on the following
-- conditions.
-- ClosedDate IS EQUAL TO null
-- PostTypeId IS EQUAL TO question
-- Score GREATER THAN OR EQUAL TO @MinimimQuestionVotes
-- AnswerCount LESS THAN OR EQUAL TO @MaximumQuestionAnswers
-- Tags CONTAIN @QuestionTags
SELECT
[Posts].Id AS [Post Link]
, [Posts].OwnerUserId AS [User Link]
, [Posts].Score
, [Posts].Tags
, [Posts].ViewCount
, [Posts].AnswerCount
FROM Posts WHERE
[Posts].ClosedDate IS NULL
AND [Posts].PostTypeId = 1
AND [Posts].Score >= @MinimumQuestionVotes
AND [Posts].AnswerCount <= @MaximumQuestionAnswers
AND [Posts].Tags LIKE '%' + REPLACE(@QuestionTags, ' ', '%%') + '%'
AND [Posts].Title LIKE '%' + REPLACE(@TitleContains, ' ', '%%') + '%'
ORDER BY Score DESC;
Finally, here's some example input for the parameters. Do note, in the @QuestionTags
and @TitleContains
fields, you need to put single quotes, ''
, and space-separate each tag/word.
@MinimumQuestionVotes: 1
@MaximumQuestionanswers: 0
@QuestionTags: 'python beginner'
@TitleContains: 'web'