Skip to content

Instantly share code, notes, and snippets.

@manniru
Created July 31, 2014 17:45
Show Gist options
  • Save manniru/32e93c8df7a46b25d37b to your computer and use it in GitHub Desktop.
Save manniru/32e93c8df7a46b25d37b to your computer and use it in GitHub Desktop.
select if rows contain morethan 1 value
SELECT `fullname`,if(count(`fullname`)>1,fullname,'NULL') as fullname
FROM (SELECT * FROM `_application` ORDER BY fullname ASC)
`_application`
GROUP BY `fullname`
ORDER BY `id` ASC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment