Skip to content

Instantly share code, notes, and snippets.

@mickeypash
Created May 2, 2015 14:40
Show Gist options
  • Save mickeypash/cde7fc9c99b5a5e6b896 to your computer and use it in GitHub Desktop.
Save mickeypash/cde7fc9c99b5a5e6b896 to your computer and use it in GitHub Desktop.
SQL query
-- 17. Get the names of people, who live at the same address
SELECT fname, sname, address
FROM Member
WHERE address = (SELECT address
FROM Member
GROUP BY address HAVING COUNT(address) > 1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment