Richard Connamacher wrote:
> This came up with an error too, but it pointed me in the right  
> direction and was easy to fix. I needed to use an alias for the  
> entire subquery too, so what finally worked is this:
> 
> SELECT avg(minprice) FROM
>       (SELECT min(price) AS minprice FROM weekly_supply_prices GROUP BY  
> month) AS minprice_table;

Interesting, but you're right ;) Btw. if you want you may skip the 'AS'.
Just 'SELECT ... FROM (....) mt;

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

Reply via email to