select t.terr_id, max(t.start_date) as start_dat from zz_sr_territory t where t.start_date <= getDate() and t.end_date>=getDate() group by t.terr_id; ---------------------------------------------------- select * from zz_sr_territory s where start_date <= getDate() and end_date>=getDate(); ------------- select * from zz_sr_territory t1, (select terr_id, max(start_date) as sdate from zz_sr_territory where start_date <= getDate() and end_date >= getDate() group by terr_id) as t2 where t1.terr_id = t2.terr_id and t1.start_date = t2.sdate;