Joachim, Try SELECT kvvnr, semester FROM lv WHERE semester = (SELECT MAX(semester) FROM lf_sem) ; Are you sure the MAX function will work on your text resp. char/varchar attribute 'semester'? Regards, Christoph
pgsql-sql by date:
Соглашаюсь с условиями обработки персональных данных