Into the Tumbleweeds

0

Please login or register to vote for this query.

(click on this box to dismiss)

Robotics Meta

Q&A about the site for professional robotic engineers, hobbyists, researchers and students

declare @StartDate  date = getdate()-##DaysAgo:int?14##;
declare @LowerBound date = dateadd(year, -2, @StartDate);

select top ##RecCount:int?500##
    Id as [Post Link]
   ,CreationDate
   ,Score
   ,ViewCount
   ,OwnerUserId as [User Link]
   ,Tags
   ,AnswerCount
   ,CommentCount
   ,FavoriteCount
   ,ClosedDate
   ,rank() over(partition by floor(cast(CreationDate as float)) order by FavoriteCount desc, ViewCount desc) r
--   ,*
from Posts
where 
   CreationDate    between @LowerBound and @StartDate
   and PostTypeId   = 1 --PostTypes.Id=1,PostTypes.Name='Question'
   and Score       >= 0
   and AnswerCount  = 0
   and CommentCount = 0
--   and ClosedDate is null
   and Tags like ('%'+ ##Tag1:string## + '%')
   and Tags like ('%'+ ##Tag2:string## + '%')
--   and Tags like ('%'+ ##Tag3:string## + '%')
--   and Tags like ('%'+ ##Tag4:string## + '%')
--   and Tags like ('%'+ ##Tag5:string## + '%')
order by Score desc, floor(cast(CreationDate as float)) desc, ViewCount desc
;

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results