I would like to count The different requests by survey Id’s and grouping it by SubjectValue
I have done this on just the one table with a sub query, but I’m not too sure to do it with several. Could anyone help me out?
This is how the 3 tables are joined. The only values of note are
subjectValue - Table A Request_Id - Table A Survey_Id - Table C
SELECT TableA.SubjectValue
FROM TableB INNER JOIN
TableA ON TableB.ID = TableA.Request_ID INNER JOIN
Table C ON TableB.Details_ID = TableC.ID
May I also add that all counts should be returned in the same row.
there are 3 different survey Id’s so the count will need a where clause on the survey_id.
Hope that makes sense.
Many thanks in advance.
You can use generic Cross-tab method