Hello All!
I have a MySQL database with 4 items, id (numerical), group_name, employees, and surveys.
I need to in my select calulate the percentage of 'employees' who my the number in 'surveys' have taken the survey.
This is the statement I have now:
SELECT group_name, employees, surveys, COUNT( surveys ) AS percentage,
((COUNT( * ) / ( SELECT COUNT( * ) FROM db_test)) * 100 ) AS percentage
FROM db_test
ORDER BY surveys