Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Counting males and females
Message
 
 
To
28/04/2002 18:41:56
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00650187
Message ID:
00650197
Views:
19
* 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
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform