Q&A for professional and enthusiast programmers
-- date range of post ##min_date## , ##max_date## -- user id ##userid## DECLARE @UID int = ##UserId## DECLARE @STYear int = ##StartYear## DECLARE @STMonth int = ##StartMonth## DECLARE @YearSpan int = ##ToYear## DECLARE @MonthSpan int = ##ToMonth## DECLARE @BEGINING datetime = datefromparts(@STYear, @STMonth, 1) DECLARE @ENDING datetime = datefromparts(@YearSpan, @MonthSpan, 1) select CreationDate, Score, ViewCount, Title from Posts where OwnerUserId = @UID and CreationDate > @Begining and CreationDate < @Ending and PostTypeId = 1 order by CreationDate