post test

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

DECLARE @Today datetime = '2018-11-07'

SELECT u.CreationDate AS 'user_created', Posts.*
FROM (
      SELECT top 2000 *
      FROM Users AS u
      WHERE DATEDIFF(month, u.CreationDate, @Today) > 6
     ) AS u
    JOIN Posts ON u.Id = Posts.OwnerUserId
WHERE Posts.CreationDate < DATEADD(month, 6, u.CreationDate);

Enter Parameters

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