How to count spesific value which how many value are uniuqe in this column?
Nov 27, 2022
As I mentioned in the above title this is very important tricky sql topic. Often times we want to know that how many value are uniuqe in any column? In order to do that let’s get started. Suppose we have a table employee as the following:
and we want to know that how many unique value in the job column? to do this operation write query as the following:
SELECT COUNT(DISTINCT(job))
FROM emp;
after query are going to processing the results are be able to 5 because of that we have 5 unique job values are in the job column.