I need to display the count of present status for a particular name
Select count(*) from employees where status='Present';
This query returns me entire present count. What should I do to get status for a particular name?
I need to display the count of present status for a particular name
Select count(*) from employees where status='Present';
This query returns me entire present count. What should I do to get status for a particular name?
Do you mean this?
select status, count(*)
from employees
group by status
Or
select name, count(*)
from employees
where status = 'Present'
group by name
Select count(*) from employees where status="Present" group by name;
Try this:
select name, count(*)
from employees
where name = 'abc' and
status = 'Present';
Share and enjoy.