Subject | Re: [firebird-support] please help with group by and subselect |
---|---|
Author | Milan Babuskov |
Post date | 2003-09-18T10:18:44Z |
Helen Borrie wrote:
will get all of those. Perhaps to add "distinct" after select?
--
Milan Babuskov
http://fbexport.sourceforge.net
> Will this do?If he has more than one record for same quote_date/suplier/product, he
>
> select
> a.supplier,
> a.last_quoted_price,
> a.last_quote_date
> from pricelist a
> where a.last_quote_date = (
> select max(b.last_quote_date) from pricelist b
> where b.supplier = a.supplier
> and b.product = a.product)
> where a.product = :product
will get all of those. Perhaps to add "distinct" after select?
--
Milan Babuskov
http://fbexport.sourceforge.net