Subject Re: [firebird-support] SQL:use aggregate function without "group by"
Author Anderson Farias
Hi,

> (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 have almost no knowledge on Oracle, so, how is this distinct from
(firebird) ::

select extract(year from RECORD.START_PERIOD-5),
avg(RECORD.CALCULATED_VALUE)
from RECORD
where RECORD.ID = 2
GROUP BY 1


?

Regards,
Anderson Farias