select tab1.aa,tab1.bb,tab2.dd from (select c1 aa,count(*) bb from your_table group by c1) tab1, (select c1 cc,count(*) dd from your_table where nl>2 group by c1) tab2 where tab1.aa=tab2.cc;
select c.c1, max(a.b), max(b.c) from (select c1, count(*) b from table1 group by c1) a, (select c1, count(*) c from table1 where nl>2 group by c1) b, table1 c where a.c1(+)=c.c1 and b.c1(+)=c.c1
select c1, count(*) sum1, sum(decode(sign(n1-2),1,1,0)) sum2 from yourtable where c1='c' group by c1
(select c1 aa,count(*) bb from your_table group by c1) tab1,
(select c1 cc,count(*) dd from your_table where nl>2 group by c1) tab2
where tab1.aa=tab2.cc;
(select c1, count(*) b from table1 group by c1) a,
(select c1, count(*) c from table1 where nl>2 group by c1) b,
table1 c
where a.c1(+)=c.c1 and b.c1(+)=c.c1
from yourtable
where c1='c'
group by c1