Home > Mobile >  Count without duplicates
Count without duplicates

Time:01-16

I'd like to count column values without any duplicates.

In the given example, I'd expect the SQL query to sum up column a to 6 (every value counted once)

datatable

CodePudding user response:

How about

select count(distinct a)
from table
  •  Tags:  
  • Related