Monday, June 30, 2014

PERCENT FROM MYSQL DATABASE

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

No comments:

Post a Comment