Skip to content

Instantly share code, notes, and snippets.

@digvijaybhakuni
Last active September 28, 2018 10:06
Show Gist options
  • Save digvijaybhakuni/a2a24805df7e07b7e9433b685dcb2a21 to your computer and use it in GitHub Desktop.
Save digvijaybhakuni/a2a24805df7e07b7e9433b685dcb2a21 to your computer and use it in GitHub Desktop.
SQL
-- Get All the unique name from employee
select name from employees group by name having count(name) = 1;
select name, count(name) from employees group by name having count(name) = 1;
-- Get All the unique name from employee
select name, count(name) from employees group by name having count(name) > 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment