Totals Query Group By

  • Thread starter Thread starter Nile
  • Start date Start date
N

Nile

Hello my name is Nile.

I have this table:
SID PID CLASS
where SID = student id.
where PID = parent id.
CLASS can equal 3, 4, 5, 6 and plus.

Here is an example of the table data:
001---23---3 (student 001, parent 23, in class 3)
002---23---5 (another student, same parent 23, in class 5 now)
003---20--12 (another student, a different parent, in class 12)

So I basically need to get something like below out of a query, I tried
making totals query
grouped by Parent, I just don't know how to get the Class calculation to
work.

Parent--Class3or4---Class5---Class6plus
23------1------------1---------0--------
20------0-------------0---------1--------

Thank you in Advance,
Nile (e-mail address removed)
 
Hi,


Try a crosstab query with the help of the wizard.

The (vertical) groups are the PID,
The (horizontal) fields to create come from CLASS
The result is the COUNT of SID.


That is it. You should get the result you are looking for.



Hoping it may help,
Vanderghast, Access MVP
 
Back
Top