Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
SQL Server Transact Basic to Expert - Using Count Aggregate function for Distinct Values
WhatsApp
Karthikeyan Anbarasan
13y
3
k
0
0
25
Blog
This blog shows how to use the Count funtion to get the count of the distinct values of a columns.
Example:
SELECT COUNT(DISTINCT Productnames) ProductCount
FROM DBO.Products
COUNT() - this is the function used to get the count.
SQL Server Transact Basic to Expert - Using Count Aggregate function for Distinct Values
Up Next
SQL Server Transact Basic to Expert - Using Count Aggregate function
Ebook Download
View all
Introducing Microsoft SQL Server 2016
Read by 11k people
Download Now!
Learn
View all
Membership not found