select * from etarih where egitimtarihi < time() and egitimid not in ( select egitimid from etarih where egitimtarihi > time() )