What does the DISTINCT keyword do when used with COUNT?

SQL Fundamentals Medium

SQL Fundamentals — Medium

What does the DISTINCT keyword do when used with COUNT?

Key points

  • DISTINCT with COUNT eliminates duplicate values
  • Only unique non-NULL values are counted
  • Helps in obtaining precise counts in SQL queries

Ready to go further?

Related questions