Help Retrieving Latest Record - Mailing list pgsql-sql

Hi,  I am not sure if this went through the first time so here it is again. <br />  <p>Ok what I am trying to do is
selectout of the database the latest record meeting a certain criteria. <p>Example: <p>Number             |       
Fruit        |     Date <br />15                                Apples          July 20, 1999 <br
/>20                               Oranges        June 7, 2000 <br />13                                
Pears           Jan 31, 2000 <br />17                                 Apples         April 10, 1999 <br />Now what I
needto do is select the oranges out because the date is the latest one, something like: <p>select * from basket where
max(date);<br />This would yield me: <br />20                                Oranges        June 7, 2000 <p>I know this
doesn'twork but I need something like it. <br />or something like <p>select * from basket where max(date) and
fruit='Apples';<br />This would yield me: <br />15                                Apples          July 20, 1999
<p>Thankyou in advance, <br />  <pre>-- 
 
Steve Meynell
Candata Systems</pre>  

pgsql-sql by date:

Previous
From: Mark Byerley
Date:
Subject: Datetime Query
Next
From: Steve Meynell
Date:
Subject: Help retrieving lastest record