I need to create a report that displays multiple counts so the end result looks something like:
Date Type1 Type 2 Type3 A B ........
17/3 1 3 2 2 4
18/3 2 1 5 5 6
The data comes from tblVesselType and Type1,Type2,Type3,Type4are in one drop down and A, B, C are in another.
So basically I want a report to show for each day, how many times the above options were selected.
At the moment, using the following quiery I only get a count of Type1, 2 and 3.
However I want a count of each type and a, b or c for each day:
SELECT tblVesselType.TypeOfVessel, Count(tblVessel.VesselId) AS CountOfVesselId
FROM tblVesselType INNER JOIN tblVessel ON tblVesselType.VesselTypeId = tblVessel.VesselType
GROUP BY tblVesselType.TypeOfVessel
HAVING (((tblVesselType.TypeOfVessel)="Type1" Or (tblVesselType.TypeOfVessel)="Type2" Or (tblVesselType.TypeOfVessel)="Type3"));
Does anyone know the best way to do multiple counts per date?
Date Type1 Type 2 Type3 A B ........
17/3 1 3 2 2 4
18/3 2 1 5 5 6
The data comes from tblVesselType and Type1,Type2,Type3,Type4are in one drop down and A, B, C are in another.
So basically I want a report to show for each day, how many times the above options were selected.
At the moment, using the following quiery I only get a count of Type1, 2 and 3.
However I want a count of each type and a, b or c for each day:
SELECT tblVesselType.TypeOfVessel, Count(tblVessel.VesselId) AS CountOfVesselId
FROM tblVesselType INNER JOIN tblVessel ON tblVesselType.VesselTypeId = tblVessel.VesselType
GROUP BY tblVesselType.TypeOfVessel
HAVING (((tblVesselType.TypeOfVessel)="Type1" Or (tblVesselType.TypeOfVessel)="Type2" Or (tblVesselType.TypeOfVessel)="Type3"));
Does anyone know the best way to do multiple counts per date?