Questions within the last week with more than x score.
Q&A about the site for mechanics and DIY enthusiast owners of cars, trucks, and motorcycles
-- Questions of the Week -- Questions within the last week with more than x score. DECLARE @MinimumScore int SET @MinimumScore = ##MinimumScore## SELECT TOP 20 Score, CreationDate, Id AS [Post Link] FROM Posts WHERE Score >= @MinimumScore AND CreationDate >= DATEADD(DAY, -15, GETDATE()) AND PostTypeId = 1 ORDER BY Score DESC, CreationDate DESC;