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
  TOP 200 a.body, b.CloseReasonTypeId
from posts a
JOIN pendingflags b ON (a.id = b.postid)
WHERE 
  YEAR(a.CreationDate) = '2018'
UNION ALL
select top 200 a.body, '0' AS flag_id
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