Subject RE: [firebird-support] How to get average price from last 10 buyings
Author Leyne, Sean
Fabio,

> I think it's something like "select avg(select last 10 buying_price from
> BUYINGS)"

You should try something like:

SELECT
AVG(SELECT FIRST 10 buying_price from BUYINGS ORDER BY ORDER_DATE Desc)
FROM RDB$Database


Sean