I have a table full of people wihch is an attendance database. What I have to do is count the number of people each day and then sub count the types of Rnak that they are. So the iniatial count of people but date is no problem. the problem comes in that I have to count them by rank as well which is in another Personnel table. This is what I have so far. So I only have the SSN in teh tblAssignedPersonnel which is the attendance table. So I count the SSN's per date of attendance, now I need to sub count how many are Enllisted, officers. So I need to take those same people and query there grade an then count them intothe specific groups.
Select Count(p.strssn)as Total,
Case when COunt(s.strGrade) in ('E1', 'E2', 'E3') as Enlisted
Case when COunt)s.strGrade) in ('O1', 'O2', 'O3') as Officer
from tblAssignedPersonnel as p INNER JOIN
MnAIrPersonnel as s on s.strSSN = p.strSSN
Where bitpresent = 1 and dtAttendance = '7/23/2008'
and IntUIcId In (Select intUicId from tblUIC where inttaskforceID = 1 and strUic = 'F41CFMBM')
ASKER
AHHHHHHHH,
Got it Works great.