Count without duplicates [closed]

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


Solution 1:

How about

select count(distinct a)
from table