Azure CLI posts

0

Please login or register to vote for this query.

(click on this box to dismiss)

Lifehacks

Q&A for people looking to bypass life's everyday problems with simple tricks

SELECT *
FROM (
SELECT 

questions.Id as QuestionId, 

Title, 

Tags, 

Body, 

Answers.AnswerBody, 

AcceptedAnswerId, 

questions.Score as QuestionScore, 

ViewCount, 

AnswerCount, 

CommentCount, 

FavoriteCount, 

questions.CreationDate as QuestionCreationDate, 

QuestionCreationYYYYMM = CAST(YEAR(questions.CreationDate) as char(4)) + RIGHT('00' + CAST(MONTH(questions.CreationDate) as varchar(2)), 2)

, LastEditDate, 

LastActivityDate, 

LastActivityYYYYMM = CAST(YEAR(questions.LastActivityDate) as char(4)) + RIGHT('00' + CAST(MONTH(questions.LastActivityDate) as varchar(2)), 2)

,ClosedDate 

FROM Posts as questions 

LEFT OUTER JOIN ( SELECT Id as AnswerId, Body as AnswerBody 

FROM Posts WHERE PostTypeId = 2) as Answers 

ON questions.AcceptedAnswerId = answers.AnswerId 

WHERE questions.PostTypeId = 1 

AND questions.Tags LIKE '%azure%' 

AND questions.score > 0 

AND questions.DeletionDate IS NULL 

AND ParentId IS NULL 

AND questions.CommunityOwnedDate IS NULL 
) x
WHERE QuestionCreationYYYYMM BETWEEN '202401' AND '202403'
 --or LastActivityYYYYMM BETWEEN '202401' AND '202406'

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results