Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (55.6k points)

Can anyone tell me SQL query to count distinct values in SQL?

1 Answer

0 votes
by (119k points)

COUNT function with a DISTINCT keyword can be used to count the distinct values in SQL. Suppose you have to count the number of distinct employees in the Employee table:

SELECT COUNT (DISTINCT e_id) as Employee

FROM EMPLOYEE;

In order to learn SQL from top experts, I recommend this SQL training course by Intellipaat that provides instructor-led training, and also certification.

Related questions

0 votes
1 answer
0 votes
1 answer
asked May 5, 2020 in SQL by Sudhir_1997 (55.6k points)
0 votes
1 answer
asked Dec 22, 2020 in SQL by Appu (6.1k points)
0 votes
1 answer
0 votes
1 answer
asked Apr 21, 2020 in SQL by Sudhir_1997 (55.6k points)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...