Subject Re: [firebird-support] Re: SubSelect Question
Author Lee Jenkins
Alan McDonald wrote:

>>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?
>>
>
>
> Use RDB$DATABASE instead of ABNTRADEDATA as the last reference - there is
> only one record in RDB$DATABASE
>
> SELECT (select avg(volume) from ABNTRADEDATA where volume >0), (select
> avg(volume) from abntradedata where volume <0) AVG_VOLUME from
> RDB$DATABASE;
>
> Alan
>

I could be Forrest Gumping here, but I don't get how RDB$Database
relates to the query.... Just sort of a place holder?


--

Warm Regards,

Lee