Q&A for professional and enthusiast programmers
set statistics io on select count(*) from Users; select min(Id) from Users; select min(Id) from Users where year(CreationDate)=2023 select min(Id) from Users where year(CreationDate)=2016 select min(Id) from Users where year(CreationDate)=2017 select min(Id) from Users; select max(Id) from Users where year(CreationDate)=2023 select max(Id) from Users where year(CreationDate)=2016 select max(Id) from Users where year(CreationDate)=2017 select top 1 * from Users order by CreationDate