Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Criteria for query to pull the hightest number

Status
Not open for further replies.

jagnval

Technical User
Feb 19, 2009
10
US
I am still working on an auction database, I have a table that collects the following: (Item/Ending Bid date/Current Bid Amount/Ending Bid amount/ Bid time/ And bidder/) and i need to create a query that pulls the highest "ending Bid Amount" (or winning bid),or the latest date for each item ,so i can send an email with the winning bidders. , how to I single out the last bid for each item. Please help thank you.
 
SQL Code similar to the following will give you the latest bid for each item:

Code:
select Item, max ([Ending bid amount])
From yourtable
Group by Item

For the latest bid date, use the [Ending bid date] in the max field instead.

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top