Skip to content

Instantly share code, notes, and snippets.

@chadwpry
Created July 24, 2011 19:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chadwpry/1102946 to your computer and use it in GitHub Desktop.
Save chadwpry/1102946 to your computer and use it in GitHub Desktop.
SELECT DISTINCT l.id, f.id, c.id
FROM public.lobbyists r
INNER JOIN public.chi_lobbyists l
ON r.first_name = l.first_name and r.last_name = l.last_name
INNER JOIN public.chi_firms f
ON r.employer_name = f.name
INNER JOIN public.chi_clients c
ON r.client_name = c.name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment