Q&A for GenAI enthusiasts and practitioners and those interested in learning more about using GenAI tools
DECLARE @Keyword nvarchar(100) = '%##LowerCaseKeyword##%' -- Build the filter result set; contains key and unanswered 'skew' value CREATE TABLE #unanswered (Id int primary key, UnansweredSkew int) INSERT #unanswered SELECT q.Id as Id, CASE WHEN q.AcceptedAnswerId is null THEN -10 WHEN q.AcceptedAnswerId is not null THEN 0 END AS [Total] FROM Posts q WHERE (q.Tags LIKE '%adal%') AND ((LOWER(q.Body) LIKE @Keyword) OR (LOWER(q.Title) LIKE @Keyword)) Select * from #unanswered