Percentage of records

  • Thread starter Thread starter Mario
  • Start date Start date
M

Mario

I have a table of people. The table has a field Gender. Each record contains
M or F.

How do I make a query that will show percentage of male and percentage of
female?
 
Mario said:
I have a table of people. The table has a field Gender. Each record contains
M or F.

How do I make a query that will show percentage of male and percentage of
female?

Something like:

SELECT Avg(IIf([Gender]="M",1,0)) AS Male, Avg(IIf([Gender]="F",1,0)) AS
Female FROM Table1;

Replace field and table names with tour own.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Back
Top