You should be able to do all of that in one query.
SELECT wcode, AVERAGE(attendance), MIN(attendance), MAX(attendance), SUM(attendance), Count(wcode)
FROM tblAttendence
GROUP BY wcode
The GROUP BY, does just that, so you've got your many records for each workshop in your attendance table, so...