Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old March 11th, 2005, 06:38 AM
Authorized User
Join Date: Jun 2003
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Default get a lowest price

if my table hav this

item_no, u.price
a0001 9.70
a0001 9.36
a0001 10.00
a0002 5.30
a00002 10.30

i need to get this result

item_no u.price
a0001 9.36
a0002 5.30

i need to get lowest u.price of the item, may i know what SQL transact Command can be used

Old March 11th, 2005, 10:02 AM
Friend of Wrox
Join Date: Jan 2004
Posts: 303
Thanks: 0
Thanked 0 Times in 0 Posts

SELECT Item_No, Min(price)
FROM MyTable
Group By Item_No
Order By Item_No

Similar Threads
Thread Thread Starter Forum Replies Last Post
Lowest and highest values in report list Odeh Naber Access 7 July 25th, 2007 06:26 AM
Select the latest date, then the lowest price. Stuart Stalker SQL Server DTS 2 October 12th, 2006 03:42 AM
lowest Price Fetching dpkbahuguna Beginning VB 6 2 February 28th, 2006 07:15 AM
Finding the row with the lowest time value Paulsh Access VBA 3 November 16th, 2004 03:06 PM
Is it worth the price? Spivonious C# 4 August 11th, 2004 03:32 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.