Created
December 9, 2012 15:19
-
-
Save verma/4245558 to your computer and use it in GitHub Desktop.
Find all agents who have an average score above a certain threshold.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT SUM(IF(average_score>65,1,0)) AS above_threshold, COUNT(*) AS total FROM | |
( SELECT agent_id, AVG(score) AS average_score | |
FROM recordings | |
JOIN evaluations ON recordings.id = evaluations.recording_id | |
GROUP BY agent_id) AS T; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment