Skip to content

Instantly share code, notes, and snippets.

@Restuta
Created October 16, 2013 17:48
Show Gist options
  • Save Restuta/7011923 to your computer and use it in GitHub Desktop.
Save Restuta/7011923 to your computer and use it in GitHub Desktop.
count of unique emails from several tables
SELECT DISTINCT COUNT(*)
FROM (
SELECT email FROM active_developers_april2013
UNION
SELECT email FROM active_developers_february2013
UNION
SELECT email FROM active_developers_march2013
) as united_developers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment