Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Maximum of a Group
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Maximum of a Group
Divers
Thread ID:
00515735
Message ID:
00515735
Vues:
42
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform