Subquery will do:
select * from basket where Date in (select max(Date) from basket);
Jie LIANG
St. Bernard Software
Internet Products Inc.
10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873
[EMAIL PROTECTED]
www.stbernard.com
www.ipinc.com
On Fri, 16 Feb 2001, St
Steve Meynell <[EMAIL PROTECTED]> writes:
> select * from basket where max(date) and fruit='Apples';
> I know this doesn't work but I need something like it.
Perhaps
select * from basket where fruit='Apples'
order by date desc
limit 1;
The limit clause is
SELECT * FROM basket ORDER BY date desc LIMIT 1;
and
SELECT * FROM basket WHERE fruit = 'apple' ORDER BY date desc LIMIT 1;
Michael Fork - CCNA - MCP - A+
Network Support - Toledo Internet Access - Toledo Ohio
On Fri, 16 Feb 2001, Steve Meynell wrote:
> Hi, I am not sure if this went through t
On Fri, Feb 16, 2001 at 09:41:09AM -0500, Steve Meynell wrote:
>
> I know this doesn't work but I need something like it.
> or something like
>
> select * from basket where max(date) and fruit='Apples';
> This would yield me:
> 15Apples July 20, 1999
It would be something like:
select * from basket where Date=(SELECT max(Date) from basket);
At 09:41 AM 2/16/2001 -0500, Steve Meynell wrote:
>Hi, I am not sure if this went through the first time so here it is again.
>
>
>Ok what I am trying to do is select out of the database the latest rec
Hi, I am not sure if this went through the first time so here it
is again.
Ok what I am trying to do is select out of the database the latest record
meeting a certain criteria.
Example:
Number
| Fruit
| Date
15
Apples July