jack sparrow
0
Q:

count in sql

/*COUNT(column_name) will return the number of rows from the column 
that are not NULL*/
SELECT COUNT(column_name)
FROM table_name;

/*COUNT(*) will return the number of rows from the table*/
SELECT COUNT(*)
FROM table_name;
6
select count(case Position when 'Manager' then 1 else null end)
from ...


select sum(case Position when 'Manager' then 1 else 0 end)
from ...
1

SELECT COUNT(column_name)

FROM table_name

WHERE condition; 
7
/* COUNT() is a function that takes on the name of a clomn as an argument
and counts the number of rows where the column is not null */

SELECT COUNT(column_name)
FROM table_name;
1

New to Communities?

Join the community