You are here: How can I write a min query? « PHP SQL « IT news, forums, messages
How can I write a min query?

Posted by laredotornado on 10/13/94 11:40

Hello,

I have a table with vacation offier_id's and prices

OFFER_ID PRICE
--------------- --------
1 50.00
2 75.00
1 85.00
1 45.00
2 200.00

I want to write a query to return the offer_id with its lowest price.
The result of scanning the above data would be

OFFER_ID PRICE
--------------- ---------
1 45.00
2 75.00

Using MySQL 4, is there any way to write a single query to do this?
I'm using PHP 4 also.

Thanks, - Dave

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация