apologies for creating a new thread about what seems to be a done to death topic on here but i've tried most of the solutions I can see from searching
I need a count of how many classes a piece of equipment is fitted to, at the moment i can get the number of different types of equipment fitted to a class but not vice vesa as that sums the number fitted on each vessel in each class rather than just the number of classes the equipment is fitted to
Edit: as things stand if I make the count a normal group by I can clearly see that for the first piece of equipment there are 7 classes listed but yet it sums the total number fitted not the number of classes fitted to
edit2: and i'm trying to do it in 1 query not 2 to reduce clutter
I need a count of how many classes a piece of equipment is fitted to, at the moment i can get the number of different types of equipment fitted to a class but not vice vesa as that sums the number fitted on each vessel in each class rather than just the number of classes the equipment is fitted to
Code:
SELECT tblMEList.[Equipment Tag], Count(tblClass.Class) AS CountOfClass
FROM ((tblCat INNER JOIN tblMEList ON tblCat.[GCFS Cat] = tblMEList.[GCSF Cat]) INNER JOIN tblShipFitData ON tblMEList.[Equipment Tag] = tblShipFitData.Equipment) INNER JOIN (tblClass INNER JOIN tblPlatformList ON tblClass.Class = tblPlatformList.Class) ON tblShipFitData.Vessel = tblPlatformList.Vessel
GROUP BY tblMEList.[Equipment Tag]
ORDER BY tblMEList.[Equipment Tag];
Edit: as things stand if I make the count a normal group by I can clearly see that for the first piece of equipment there are 7 classes listed but yet it sums the total number fitted not the number of classes fitted to
edit2: and i'm trying to do it in 1 query not 2 to reduce clutter
Last edited: