Hi
I'm trying to count the total number of workdays for all volunteers that are not "Type 4" volunteers. A volunteer can be multiple types, hence I think why I'm getting a much larger count than expected.
SELECT COUNT(taskvolsnew.vol) AS howmany
FROM taskvolsnew
LEFT JOIN tasks
ON taskvolsnew.taskref = tasks.ref
AND taskvolsnew.taskregion = tasks.region
LEFT JOIN volunteers_types
ON taskvolsnew.vol = volunteers_types.volref
AND taskvolsnew.volregion = volunteers_types.volregion
AND volunteers_types.voltype != '4'
Any help greatly appreciated.
I'm trying to count the total number of workdays for all volunteers that are not "Type 4" volunteers. A volunteer can be multiple types, hence I think why I'm getting a much larger count than expected.
SELECT COUNT(taskvolsnew.vol) AS howmany
FROM taskvolsnew
LEFT JOIN tasks
ON taskvolsnew.taskref = tasks.ref
AND taskvolsnew.taskregion = tasks.region
LEFT JOIN volunteers_types
ON taskvolsnew.vol = volunteers_types.volref
AND taskvolsnew.volregion = volunteers_types.volregion
AND volunteers_types.voltype != '4'
Any help greatly appreciated.