Q&A for gardeners and landscapers
/*select min(id) [cut off] , eomonth(creationdate) [end of month] from votes group by eomonth(creationdate) order by 2 */ select top 1 id from votes where creationdate < dateadd(yy,-1,getdate()) order by creationdate desc