add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
SELECT staff.first_name, staff.last_name, city.city
FROM staff -- staff member
JOIN address address1 ON staff.address_id = address1.address_id -- member's address
JOIN store ON staff.store_id= store.store_id -- members' store
JOIN address address2 ON store.address_id = address2.address_id -- store's address
JOIN city ON address1.city_id = city.city_id -- member's city (may join to address2 and get store's city)
WHERE address1.city_id = address2.city_id -- check that member's city and store's city is the same city
first_name last_name city
Mike Hillyer Lethbridge
Jon Stephens Woodridge