Subject | Re: [firebird-support] Help Group by |
---|---|
Author | Martijn Tonies |
Post date | 2006-03-15T17:23:32Z |
> I need to make this query:What Order_ID do you expect from a grouped
> the lower cost of product ordered for each oreder.
>
> this work well
>
> SELECT cod_art, MIN(cost)
> FROM orders
> GROUP BY cod_art
>
> but this return each row in orders
>
> SELECT order_ID, cod_art, MIN(cost)
> FROM orders
> GROUP BY order_ID, cod_art
>
> How can I add order_ID in the first query?
set of orders?
Martijn Tonies
Database Workbench - development tool for Firebird and more!
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com