1select count(case Position when 'Manager' then 1 else null end)
2from ...
3
4
5select sum(case Position when 'Manager' then 1 else 0 end)
6from ...
1SELECT count(*)
2FROM information_schema.columns
3WHERE table_name = 'Your_table_nale';
4
1/*COUNT(column_name) will return the number of rows from the column
2that are not NULL*/
3SELECT COUNT(column_name)
4FROM table_name;
5
6/*COUNT(*) will return the number of rows from the table*/
7SELECT COUNT(*)
8FROM table_name;
1SELECT count(CASE WHEN gender = 'F' THEN 1 ELSE NULL END) women_count,
2 count(CASE WHEN gender = 'M' THEN 1 ELSE NULL END) men_count
3FROM people;