SQL DB2
This is what I have to start with
SELECT DISTINCT
Last_Name, First_Name, State
FROM AddressTable;
I am trying to modify the query to look through AddressTable
and if State = IL
then everyone with the same Last_Name
should be filtered out.
If my results were below then I would want all of the records with last name Jones removed
Smith, Bob, MO
Smith, Eric, MO
Jones, Bob, MO
Jones, Eric, IL
Jones, Tim, NE