Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL -- getting hourly averages of 15 minute bars
Message
De
06/02/2014 11:39:12
 
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:
01593502
Vues:
44
>Thanks. I tried this. The name of my table is in fact ratings
>
>
>select [hour], avg(mRating) as AvgRating from Ratings GROUP BY [hour]
>
>
>But I don't get an average for every hour, instead I got an average for the entire table, in other words a table with a single record?
>
>
>exp_1     AvgRating
>hour       3.64
>
>
>Have any ideas?
>Thanks
>Steve

That SELECT is Sql Server syntax. The brackets are used because hour is a keyword. In VFP syntax, the brackets are a string delimiter, making you select the string "hour". Try it again without the brackets.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform