Skip to content

Instantly share code, notes, and snippets.

@fatgy
Created February 3, 2014 13:33
Show Gist options
  • Save fatgy/aeab13d4022fbbbf0b68 to your computer and use it in GitHub Desktop.
Save fatgy/aeab13d4022fbbbf0b68 to your computer and use it in GitHub Desktop.
SELECT p.extracted_code
FROM (
select extracted_code
from policy
group by extracted_code
) AS p
LEFT OUTER JOIN (
SELECT code_cleaned
FROM `commission`
group by code_cleaned
) AS s
ON s.code_cleaned = p.extracted_code
WHERE s.code_cleaned IS NULL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment