AAD Graph Weighted

1

Please login or register to vote for this query.

(click on this box to dismiss)

The Workplace Meta

Q&A about the site for members of the workforce navigating the professional setting

-- DECLARE @Keyword nvarchar(100) = '%##LowerCaseKeyword##%' -- user prompt
DECLARE @Keyword nvarchar(30) = '% graph %' -- leading/trailing space helps match stackoverflow.com search behavior

-- Build the filter result set; contains key and unanswered 'skew' value
CREATE TABLE #unanswered (Id int primary key, Age int, UnansweredSkew int)
INSERT #unanswered
SELECT q.Id as Id, 
CAST((GETDATE() - q.CreationDate) AS INT) as Age,
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 '%azure-active-directory%'))
--    OR (q.Tags LIKE '%office365%')
--    OR (q.Tags LIKE '%adal%'))
AND ((LOWER(q.Body) LIKE @Keyword)
   OR(LOWER(q.Title) LIKE @Keyword))

Enter Parameters

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