I have a table like this.
id Person year 1 4 2001 2 7 2001 3 5 2001 4 9 2001 5 4 2001 6 7 2002 7 2 2002 8 5 2002 9 4 2002 10 6 2002 11 6 2003 12 4 2003 13 9 2003 14 2 2004 15 3 2004 16 7 2004 17 5 2004 18 7 2004 19 9 2005 20 8 2005
I would like for it to print all the years that person ‘9’ has not been a part of.
I thought this was as simple as simply putting WHERE person!=9 GROUP by year, but that doesn’t work, as if it ignores my where command.
It does however work the other way around when I say person=9 – then I only get the years that he has been a part of.
I have tried joining the table with itself. But no luck.
OR