Subject | RE: [firebird-support] SQL:use aggregate function without "group by" |
---|---|
Author | Sasha Matijasic |
Post date | 2008-09-01T12:28:44Z |
> within other DBs one can use aggregate functions without the group byFirebird doesn't support that syntax. The feature has been requested in the tracker though.
> clause. This is mostly achieved with the "over( ... )" statement like
> this
> (example is in Oracle):
> "select distinct TO_CHAR(RECORD.START_PERIOD-5, 'YYYY'),
> avg(RECORD.CALCULATED_VALUE)
> over (partition by TO_CHAR(RECORD.START_PERIOD-5, 'YYYY'))
> from RECORD
> where RECORD.ID = 2".
>
> I haven't found an equivalent for this in the firebird environment
> looking
> at the docs and google. Is there any way to do this with firebird?
>
Sasha