PERCENT FROM MYSQL DATABASE
SELECT group_name, employees, surveys, COUNT( surveys ) AS percentage,
((COUNT( * ) / ( SELECT COUNT( * ) FROM db_test)) * 100 ) AS percentage
FROM db_test
ORDER BY surveys
SELECT group_name, employees, surveys, COUNT( surveys ) AS percentage,
((COUNT( * ) / ( SELECT COUNT( * ) FROM db_test)) * 100 ) AS percentage
FROM db_test
ORDER BY surveys
No comments:
Post a Comment