Subject | RE: [firebird-support] How to get average price from last 10 buyings |
---|---|
Author | Leyne, Sean |
Post date | 2009-08-25T23:34:57Z |
Fabio,
SELECT
AVG(SELECT FIRST 10 buying_price from BUYINGS ORDER BY ORDER_DATE Desc)
FROM RDB$Database
Sean
> I think it's something like "select avg(select last 10 buying_price fromYou should try something like:
> BUYINGS)"
SELECT
AVG(SELECT FIRST 10 buying_price from BUYINGS ORDER BY ORDER_DATE Desc)
FROM RDB$Database
Sean