Subject | Re: SubSelect Question |
---|---|
Author | Tom Frey |
Post date | 2003-11-11T00:25:26Z |
I just ran this query:
SELECT (select avg(volume) from ABNTRADEDATA where volume >0), (select
avg(volume) from abntradedata where volume <0) AVG_VOLUME from
ABNTRADEDATA;
and it took me 458seconds to execute? what's wrong here?
--- In firebird-support@yahoogroups.com, "Alan McDonald" <alan@m...>
wrote:
SELECT (select avg(volume) from ABNTRADEDATA where volume >0), (select
avg(volume) from abntradedata where volume <0) AVG_VOLUME from
ABNTRADEDATA;
and it took me 458seconds to execute? what's wrong here?
--- In firebird-support@yahoogroups.com, "Alan McDonald" <alan@m...>
wrote:
> > Hi,column
> >
> > sorry maybe I misworded it.
> >
> > I just have one table with the volume column and I'd like to do only
> > one select statement that gives me both the averages for the negative
> > volume numbers and the positive numbers which reside in the same
> >
>
> SELECT (select avg(old_salary) from salary_history where old_salary>0)
> avgsal from RDB$DATABASE
>
> you might get the drift
>
> Alan