Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Maximum of a Group
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Maximum of a Group
Miscellaneous
Thread ID:
00515735
Message ID:
00515735
Views:
41
Hi, Mr. YASQ here (yet another SQL question...)

When I retrieve a bunch of records, and there are multiple records with data from several days. I want the query to return only those records from the most recent day. So say I have days 56, 57 and 58...and I want *all* the records from 58, but not records from the other days.

Something like:


SELECT * FROM wrktable;
WHERE acq_time=MAX(acq_time)


The MAX function doesn't work in this instance, as it returns only a single record, (the first maybe?) that meets the criteria.

I know I could kludge this several SQL queries but it would be great to have this happen in a single query.

TIA... L
-- Larry Keyes
Remember only You can prevent Gray Goo. Never release nanobot assembers without replication limiting code.
Next
Reply
Map
View

Click here to load this message in the networking platform