Subject | Re: [firebird-support] Problem in Nested aggregate functions -FireBird1.5 |
---|---|
Author | Alexandre Benson Smith |
Post date | 2006-05-04T04:52:19Z |
suresh.dodda@... wrote:
In FB 1.5 you could create a view with the counts and then select the
MAX from there.
or
select first 1 COUNT (usr_id), usr_id FROM usr_det GROUP BY usr_id order by 1 desc;
In FB 2.0 you could use in-line views.
see you !
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br
> I am using following query.Hi Suresh,
>
> I am getting the error: Nested aggregate functions are not allowed
>
> Can any one suggest how to use nested aggregate functions?
>
>
>
> SELECT MAX (COUNT (usr_id)) FROM usr_det GROUP BY usr_id;
>
>
In FB 1.5 you could create a view with the counts and then select the
MAX from there.
or
select first 1 COUNT (usr_id), usr_id FROM usr_det GROUP BY usr_id order by 1 desc;
In FB 2.0 you could use in-line views.
see you !
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br