Search for a string that occurs either in title, tags or body Posts need a minimum score of 7 and should be without code in body
Q&A for cartographers, geographers and GIS professionals
-- Top Score Question to Given Tags/Keywords without Code Examples -- DECLARE @Tag1 VARCHAR(30) = ##KeywordOne:string##; SET @Tag1 = '%' + LTRIM(RTRIM(@Tag1)) + '%'; DECLARE @Tag2 VARCHAR(30) = ##KeywordTwo:string##; SET @Tag2 = '%' + LTRIM(RTRIM(@Tag2)) + '%'; SELECT Id AS [Post Link], Score, Tags, Body FROM Posts q WHERE PostTypeId = 1 AND ((q.Tags LIKE @Tag1 AND q.Tags LIKE @Tag2) OR (q.Title LIKE @Tag1 AND q.Title LIKE @Tag2)) AND q.Body NOT LIKE '%code%' AND q.Score > 30 -- Remove line above to allow Questions with Code -- ORDER BY Score DESC