Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle query
Amritha.Datta_at_gmail.com wrote:
> Can you please give me an example of doing it? > I appreciate your help. > > Thanks. > > DA Morgan wrote: >> Amritha.Datta_at_gmail.com wrote:
>> Do your GROUP BY as an in-line view and then join it in another query >> where you grab recnum. >> -- >> Daniel A. Morgan >> University of Washington >> damorgan_at_x.washington.edu >> (replace x with u to respond) >> Puget Sound Oracle Users Group >> www.psoug.org >
desc all_objects;
SELECT tablespace_name, COUNT(*)
FROM all_tables
GROUP BY tablespace_name;
SELECT tablespace_name, COUNT(*)
FROM all_tables
GROUP BY tablespace_name
HAVING COUNT(*) > 100;
SELECT ilv.tablespace_name, at.table_name
FROM (
SELECT tablespace_name, COUNT(*)
FROM all_tables
GROUP BY tablespace_name
HAVING COUNT(*) > 100) ilv,
all_tables at
WHERE ilv.tablespace_name = at.tablespace_name;
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Fri Aug 11 2006 - 18:57:47 CDT