User-719153870 posted
Hi slimbunny,
Goals:
Select statements from 1 table
Between the lowest year for CreateDate AND the current year 2019
Also confused about your needs, are you trying to secect data from your table where the date of these data is between the lowest year and current year?
If so, please refer to below code:
create table DateTable
(
id int identity(1,1),
DDate date,
Mark varchar(50)
)
insert into DateTable values('1989','aaa')
insert into DateTable values('2009','bbb')
insert into DateTable values('1996','ccc')
insert into DateTable values('2000','ddd')
insert into DateTable values('2020','eee')
--select * from DateTable
select * from DateTable where YEAR(DDate) between (select MIN(YEAR(DDate)) from DateTable) and (select YEAR(GETDATE()))
This demo will get you:

Best Regard,
Yang Shen