How to count spesific value which how many value are uniuqe in this column?

Anar Məmmədov
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:

EMPLOYEE TABLE

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.

--

--

Anar Məmmədov
Anar Məmmədov

Written by Anar Məmmədov

Java Backend Developer wondering RDBMS and processing of structure any technology that is related backend.

No responses yet