query t1

0

Please login or register to vote for this query.

(click on this box to dismiss)

Amateur Radio

Q&A for amateur radio enthusiasts

SELECT
  a.Title, 
  a.body, 
  a.ViewCount, 
  a.CreationDate, 
  b.CloseReasonTypeId,
  b.DuplicateOfQuestionId, 
  b.CloseAsOffTopicReasonTypeId 
FROM
  posts a
LEFT JOIN pendingflags b ON (a.id = b.postid or b.postid IS NULL)
LEFT JOIN CloseReasonTypes as c ON (b.CloseReasonTypeId = c.Id or c.id IS NULL)
WHERE 
  YEAR(a.CreationDate) = '2019' AND
  MONTH(a.CreationDate) = 2 AND
  DAY(a.CreationDate) = 1
ORDER BY b.CloseReasonTypeId DESC

/*UNION ALL

SELECT
  TOP 500 a.body, 0 as 'CloseReasonTypeId', 'Not Flagged' as 'Name'
FROM
  posts a
LEFT JOIN pendingflags b ON (a.id = b.postid)
WHERE YEAR(a.CreationDate) = '2019' AND b.postid IS NULL*/

Enter Parameters

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