how using count function in sql oracle without using group by?
select count(*) as "Total orders",
nvl(
(select count (*)
from education
where status='APPROVED'),
0
) as "Number of approved requests"
from education
>Solution :
Use conditional aggregation:
select COUNT(*) as "Total orders",
COUNT(CASE status WHEN 'APPROVED' THEN 1 END)
as "Number of approved requests"
from education_expense