Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2003
    Location
    Hasselt, Belgium
    Posts
    3

    Unanswered: calculating percentages in queries

    Hi!

    I have a database of a sports club. There's male and female members, males represented by a checked checkbox in the table.
    Now i want to make a query that calculated the percentage of female members in the club.

    Any suggestions?

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    select 'female pct: '
    , sum( iif(malecheckbox=0, 1, 0) )
    / ( select count(*) from yourtable )
    from yourtable


    rudy
    http://r937.com/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •