×
6 days ago · COUNT() function with distinct clause. SQL COUNT() function with DISTINCT clause eliminates the repetitive appearance of the same data.
People also ask
To count the number of different values that are stored in a given column, you simply need to designate the column you pass in to the COUNT function as DISTINCT ...
The COUNT DISTINCT function returns the number of unique values in the column or expression, as the following example shows. SELECT COUNT (DISTINCT item_num) ...