Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Statement
Message
 
 
À
07/02/2011 12:45:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
MySQL
Divers
Thread ID:
01499047
Message ID:
01499049
Vues:
49
>Hi Expert
>
>I have a Table of about 100000 records of about 3000 Codes. I want to select Code,Last Pur.Rate with Date of each code.
>
>Thnx in advance
>
>Rgds:
>Ahsan Rana

One of the possibilities
select T1.* from Codes T1 inner join (select Code, max(Rate) as MaxRate from Codes group by Code) T2
on T1.Code = T2.Code and T1.Rate = T2.MaxRate
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform