Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Counting males and females
Message
From
29/04/2002 11:05:02
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00650187
Message ID:
00650409
Views:
19
Thanks Sergery!



>
* To have the counts in the same row
>SELECT ..., ;
>     Sum( IIF(Genderc="M", 1, 0)) AS males, ;
>     Sum( IIF(Genderc="F", 1, 0)) AS females, ...
>* To have the counts in the separate rows
>SELECT ..., ;
>     COUNT(*) AS males, ;
>     ...
>  WHERE Genderc="M" ....
>  ...
>UNION
>SELECT ..., ;
>     COUNT(*) AS females, ;
>     ...
>  WHERE Genderc="F" ....
>
>
>>Hi Group
>>
>>I have a report from a remote view and all of the fields are grouped.
>>
>>How do I report the number of females and the number of males takeing class.
>>Genderc has values of F and M.
>>
>>The report breaks down the student body by class and section number.
>>
>>The number in a section and total number taking class is reproted in the section and class group footers.
>>
>>Thanks
>>Jim
Previous
Reply
Map
View

Click here to load this message in the networking platform