Q&A for scientists using computers to solve scientific problems
DECLARE @Reputation int = ##Reputation## SELECT Q.Id, IIF(Max(U.Reputation) >= @Reputation, 1, 0) As IsHighRep FROM Posts AS Q LEFT JOIN (Posts AS A INNER JOIN Users AS U ON A.OwnerUserId=U.Id) ON A.ParentId=Q.Id WHERE Q.ParentID Is Null AND Q.CreationDate > DateAdd(m, -1, GETDATE()) GROUP BY Q.Id