Select DISTINCT(yr) from (select year(issue_date) as yr, issue_date from color_master,stamps where issue_date!='' and color_master.color_code=stamps.color_code and color_master.color='Two colours' order by issue_date) t