Q&A for amateur radio enthusiasts
DECLARE @ResultRows Int = ##RowsToReturn## DECLARE @CreationDate DateTime = '##CreationDate##' DECLARE @UserId Int = ##UserId## DECLARE @Name Varchar(40) = '##UserName##' SELECT Top (@ResultRows) *, 'http://stackoverflow.com/users/' + cast(Id as Varchar(100)) + '/' + DisplayName AS SiteUserUrl FROM Users WHERE CreationDate >= @CreationDate And (Id = @UserId OR (Not Exists (Select * From Users Where CreationDate >= @CreationDate And Id = @UserId) And DisplayName Like @Name)) ORDER BY CreationDate