Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot get the average to work in sql statement
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00679197
Message ID:
00679209
Vues:
19
You've parenthesis in the wrong place
(vehicle.v_mileage-MIN(a_startmile))/6.5 as average
>I am trying to get an average from following sql statement but it returns wrong number:
>
>v_mileage = 50
>min(a_startmile) = 30
>v_mileage-(min(a_startmile) is equal to 20
>
>
>
(vehicle.v_mileage-(MIN(a_startmile))/6.5) as average
>
>
>gives me
45.3846
which is wrong.
>
>Is there a trick to get an average in an sql statement?
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform