What does the `DISTINCT` keyword do when used with `COUNT()`?

Advanced SQL Developer Easy

Advanced SQL Developer — Easy

What does the `DISTINCT` keyword do when used with `COUNT()`?

Key points

  • `DISTINCT` ensures each unique value is counted only once
  • `COUNT()` with `DISTINCT` eliminates duplicate values
  • The result is a count of unique non-NULL values

Ready to go further?

Related questions