I have a homework assignment that I can't seem to figure out.
I don't want the entire query as an answer, that's why I won't include any table structures or SQL. I just need some information on how to tackle this issue in SQL. Any help will be appreciated!
Given the following result table, how can I check (per row) if the Location_ID value of ID is the same as the Location value of ID's Substitute? The query should give me a new table for every case where the locations don't match.
E.G. ID 1 has a location of 45 and 5 as Substitute. ID 5 has a location of 67, so they should be listed in the result table of the query.
ID 3 has a location of 34 and 2 as a substitute. ID 2 also has a location of 34, so ID 3 should be left out of the result table.