List:General Discussion« Previous MessageNext Message »
From:Peter Brawley Date:December 13 2006 6:36am
Subject:Re: query help
View as plain text  
>I only want to view the product per product name
>which has the lowest price.

SELECT product_name,MIN(price)
FROM tbl
GROUP BY product_name;

PB

uYe wrote:
> Hi,
> I have a table with product_name, price field. The product name may be exist
> in more than one record. I only want to view the product per product name
> which has the lowest price. Please help me to  build such query, many thanks
> for your helps.
>
> Regards
>
>
> Willy
>
>
>   


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.15.16/582 - Release Date: 12/11/2006

Thread
query helpuYe13 Dec
  • Re: query helpPeter Brawley13 Dec