Questions

access query

Tags:
+
0 Votes
Locked

access query

rafiqkhan81
i have a database having a table of student as given below
stId,Name,instituteName,***,sector
1 a b m public
2 b c f private


100 z u f public
now i want to count how many student r girls and how many boys also want the number of student from orivate and public school
  • +
    0 Votes
    Tony Hopkinson

    Select ***, Count(stld)
    From Students
    Group By ***

    Type of school, I'll leave as an exercise for the class

    If you just want the number of boys
    Select Count(*) from Students Where *** = 'male'

    or some such will do it.

    HtHs

    +
    0 Votes
    GruntingDwarf

    This kind of query presents you with a matricial grid where rows are the values of one column of your table and grid columns are the values of another column of your table, storing group calculations (subtotals, counts) on the intersect cells.

    So you could get a grid like this:

    -- priv publ
    F 231 *** 686
    M 340 414 754
    -- 571 869 1440

    Such an array seems to fit your needs, I hope.

  • +
    0 Votes
    Tony Hopkinson

    Select ***, Count(stld)
    From Students
    Group By ***

    Type of school, I'll leave as an exercise for the class

    If you just want the number of boys
    Select Count(*) from Students Where *** = 'male'

    or some such will do it.

    HtHs

    +
    0 Votes
    GruntingDwarf

    This kind of query presents you with a matricial grid where rows are the values of one column of your table and grid columns are the values of another column of your table, storing group calculations (subtotals, counts) on the intersect cells.

    So you could get a grid like this:

    -- priv publ
    F 231 *** 686
    M 340 414 754
    -- 571 869 1440

    Such an array seems to fit your needs, I hope.