hi,
I am using configurable reports plugin
following the report list of courses that contains any answer, and the number of answers
(we have many reports , so I added where clause to specifiy which feedback fb.name LIKE '%NameOfReport%'
=========================
List of Courses and number of Reponses in each course
select distinct c.shortname,concat('<a target="_new" href="%%WWWROOT%%/course/view.php?id=',c.id,'">',c.fullname,'</a>') CourseName,ct.name,fb.id,fb.name, COUNT(fbc.feedback)
,(SELECT COUNT( DISTINCT ra.userid ) AS Users
FROM prefix_role_assignments AS ra
JOIN prefix_context AS ctx ON ra.contextid = ctx.id
WHERE ra.roleid = 5
AND ctx.instanceid = c.id) AS Students
FROM prefix_feedback fb
JOIN prefix_feedback_completed fbc
JOIN prefix_course c
JOIN prefix_course_categories ct
ON fb.id=fbc.feedback
AND fb.course=c.id
AND c.category=ct.id
WHERE ct.id IN (2,3,4)
AND fb.name LIKE '%NameOfReport%'
GROUP BY fb.id,c.shortname
ORDER BY ct.id
=========================
see also this report mifhgt help you from ad hoc contributed reports