Re: Keeping Result Table
From: Mark Grand <mdg_at_netcom7.netcom.com>
Date: 1995/08/05
Message-ID: <MDG.95Aug5051354_at_netcom7.netcom.com>#1/1
Date: 1995/08/05
Message-ID: <MDG.95Aug5051354_at_netcom7.netcom.com>#1/1
In article <1995Aug4.104459.2232_at_figmnt.tayloru.edu> dganderso_at_figmnt.tayloru.edu (Doug Anderson) writes:
> Also, is there a better way to do the following? I wish to show the average
> number of rows per block for a given table. This is all that I could come
> up with...
>
> CREATE VIEW TMPVIEW
> AS select count(*) ZORK
> from &tablename
> group by substr(rowid,1,8);
>
> SELECT AVG(ZORK)
> FROM TMPVIEW;
>
> DROP VIEW TMPVIEW;
Yes. Try
SELECT AVG(ZORK)
FROM (select count(*) ZORK from &tablename group by substr(rowid,1,8));
-- ============================== Mark Grand Voicemail: 1-800-RAPID60 RSSIReceived on Sat Aug 05 1995 - 00:00:00 CEST