Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SELECTing MAX()
Message
De
13/12/2000 18:17:25
 
 
À
13/12/2000 18:09:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00452686
Message ID:
00453153
Vues:
24
>>Hi Dragan
>>
>>I've tried to do that kind of query in one line and even asked for more input here on the UT, but apparently its not possible in VFP's SQL implementation.
>>
>>I'm going to ask if VFP 7 can do it.
>
>How about something like
>
>SELECT * FROM MyCursor cur1;
>WHERE score IN (SELECT MAX(score) FROM MyCursor cur2 WHERE cur1.id=cur2.id)

This will get all records which match the highest score per individual. I'm not sure I can get just the first one, or last one.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform