Sorry to be so quick ... but I *think* this will work out for you ... its AIR CODE and done quickly ... so you may have to tweak a bit ...
SELECT a.OperName, b.CountS, c.CountD, d.CountN
FROM
((Operations a
LEFT JOIN (SELECT OperName, count(Category) As CountS
FROM Surveys
WHERE Category = "Satisfied"
GROUP BY OperName) b
ON a.OperName = b.OperName)
LEFT JOIN (SELECT OperName, count(Category) As CountS
FROM Surveys
WHERE Category = "Dissatisfied"
GROUP BY OperName) c
ON a.OperName = c.OperName)
LEFT JOIN (SELECT OperName, count(Category) As CountN
FROM Surveys
GROUP BY OperName) d
ON a.OperName = d.OperName
Main Topics
Browse All Topics





by: AaronroachPosted on 2009-07-13 at 14:33:15ID: 24844216
why dont you just use access's query builder it would make this so simple, drag all the tables on the the workspace, drag the connections you want to make (field to field), then drag the fields you want to view in to the field list below. and if you need to do groupbys or counts, hit the equation button and change to which ever you require.