I am new to SQL and I am trying to solve the following problem:
I have a marathon table with 2 different years, where a marathon took place and a column that describes what athlete participated in a specific year. I want to return the names of the athletes who participated in 2001 but not in 2000. I've tried different queries (exists, not in, and not etc.) so far but none is working.
year | athlete |
---|---|
2000 | White |
2000 | Adams |
2000 | Smith |
2001 | White |
2001 | Johnson |