Skip to content

Instantly share code, notes, and snippets.

@joffilyfe
Created December 10, 2015 01:37
Show Gist options
  • Save joffilyfe/c2481be8a8af1f422713 to your computer and use it in GitHub Desktop.
Save joffilyfe/c2481be8a8af1f422713 to your computer and use it in GitHub Desktop.
SELECT DISTINCT maybe_utf8_decode(CONCAT(a.first_name,' ',a.middle_name, ' ' ,a.last_name)) "Nome" FROM users a JOIN registrations r ON a.user_id = r.user_id WHERE UPPER(maybe_utf8_decode(CONCAT(a.first_name,' ',a.middle_name, ' ' ,a.last_name))) NOT IN (SELECT maybe_utf8_decode(UPPER(full_name)) FROM tb_user)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment