Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Database > SQL Language
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 11th, 2005, 06:38 AM
Authorized User
Join Date: Jun 2003
Location: Shah Alam, Selangor, Malaysia.
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

Reply With Quote
  #2 (permalink)  
Old March 11th, 2005, 10:02 AM
Friend of Wrox
Join Date: Jan 2004
Location: , , USA.
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

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

All times are GMT -4. The time now is 01:08 PM.

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