Skip to content

Instantly share code, notes, and snippets.

@toyeiei
Created November 9, 2018 01:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toyeiei/a5a27da517ba0f6e5a92bdda9db3fddd to your computer and use it in GitHub Desktop.
Save toyeiei/a5a27da517ba0f6e5a92bdda9db3fddd to your computer and use it in GitHub Desktop.
SQL for Beginner - COUNT DISTINCT
-- count only distinct country in table customers
SELECT COUNT(DISTINCT country)
FROM customers;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment