SQL CORR SUBQUERY EXPERTS
From: MGreen1962 <mgreen1962_at_aol.com>
Date: 1996/07/26
Message-ID: <4tasrc$r8k_at_newsbf02.news.aol.com>#1/1
Date: 1996/07/26
Message-ID: <4tasrc$r8k_at_newsbf02.news.aol.com>#1/1
Hello, 2 all that would try to answer this question.
How would I write a query that returns group rows where the count >= some
value.
i.e.
I know the count(*) function cannot be used in a where clause. I tried to
use a correlated subquery and my system locked each time. My query is as
follows:
select table_name,count(*) from sys.dba_constraints x
where to_number('1')>=(select count(*) from sys.dba_constraints where
select table_name,count(*)
from sys.dba_constraints
where count(*) >= 7
group by table_name;
x.table_name=table_name)group by table_name;
Please help. email Mgreen1962_at_aol.com Received on Fri Jul 26 1996 - 00:00:00 CEST