Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calculating percentage of records with SQL
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Calculating percentage of records with SQL
Miscellaneous
Thread ID:
00557394
Message ID:
00557394
Views:
62
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
Next
Reply
Map
View

Click here to load this message in the networking platform