Skip to content

Instantly share code, notes, and snippets.

@pcothenet
Created August 6, 2015 16:21
Show Gist options
  • Save pcothenet/85dd044aa2f6cb026727 to your computer and use it in GitHub Desktop.
Save pcothenet/85dd044aa2f6cb026727 to your computer and use it in GitHub Desktop.
account_firmographics
SELECT 
  c.contact_id,
  c.email,
  af.*
FROM 
  contacts AS c
INNER JOIN 
  contacts_to_accounts AS c2a
ON c.contact_id = c2a.contact_id
INNER JOIN 
  accounts_firmographics AS af
ON c2a.account_id = af.account_id; 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment