Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calculating percentage of records with SQL
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Calculating percentage of records with SQL
Divers
Thread ID:
00557394
Message ID:
00557394
Vues:
60
i have like this SQL syntax

select sex,count(sex) from f:\okul_win\okul2 ;
group by sex;
order by sex;
into curs mycurs
brow
use in mycurs

and it shows in browse mode

sex cnt_sex
M 12
W 5

but i want to calculate percentage of M W counts of total records

total records =17
M=12/17=0,71
M=5/17=0,29

it must show in browse mode

sex cnt_sex percentage
M 12 0,71
W 5 0,29

but how ?

thanks for the help
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform