I have the following SQL query
select distinct fnamn,enamn,pubdatum
from author,book
where pubdatum <'1961-0-0 AND author.enamn=book.forfattarenamn;
And this is fine it shows all authors who have a book published before 1961 but what if i want only the authors who published before but not after 1961?
I thought about adding a NOT EXISTS like this
select distinct fnamn,enamn,pubdatum
from author,book
where pubdatum <'1961-0-0' AND author.enamn=book.forfattarenamn
AND NOT EXISTS
(select distinct fnamn,enamn,pubdatum
from author,book
where pubdatum >='1961-0-0' AND author.enamn=book.forfattarenamn);
So in the subquery it list all authors who published after 1961. As i understood it this now removes those authors from the orignal query. but running this SQL statement returns no rows. Have i missunderstood the NOT EXISTS?