Welcome to collectivesolver - Programming & Software Q&A. A website you can trust. All programs tested and work.

aviboots(AT)netvision.net.il

Instant Grammar Checker - Correct all grammar errors and enhance your writing
BlueHost Web Hosting

Bonsai Boy of New York Bonsai Trees and Accessories

Website Domains Names & Hosting | Domain.com

Instant Grammar Checker - Correct all grammar errors and enhance your writing

Ecommerce Software - Best Ecommerce Platform Made for You - Free Trial

DreamHost Web Hosting


Liquid Web Cloud VPS Hosting

Disclosure We are a professional Programming & Software Q&A website, that receives compensation from some of the links whose we show you with Information. It means that my content may contain affiliate links.

13,233 questions

18,018 answers

573 users

How to use SQL COUNT() Function in MySQL

Online Web Development & Programming Courses | Udemy
72 views
asked Sep 29, 2015 by avibootz
edited Oct 12, 2015 by avibootz

3 Answers

0 votes
-- NULL values in Salary column will not be counted

SELECT COUNT(Salary) FROM workers

 




answered Sep 29, 2015 by avibootz
0 votes
-- Count unique values

SELECT COUNT(DISTINCT Salary) FROM workers

 




answered Sep 29, 2015 by avibootz
0 votes
-- Use alias as the result column title

SELECT COUNT(Salary) AS TotalSalaries FROM workers

 




answered Sep 29, 2015 by avibootz
...