Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL -- getting hourly averages of 15 minute bars
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01593485
Message ID:
01593552
Vues:
34
>I think I could pull this off if you show me how to separate the steps:
>
>Do the first (inner) select into a cursor and then join with that cursor.
>
>My bible for sQL was the FoxPro Programmers Reference and VFP 9's help.
select Account, max(mRating) as MaxRatingForAccount from Ratings GROUP BY Account ORDER BY Account INTO CURSOR csrMx NOFILTER

BROWSE && Just to view the result - comment this later

select R.* from Ratings R INNER JOIN csrMx AS Mx 
ON R.Account = Mx.Account and R.mRating = Mx.MaxRatingForAccount
If it's not broken, fix it until it is.


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

Click here to load this message in the networking platform