Last active
August 27, 2020 19:16
-
-
Save kru/566c041618d67cc5d03c9ef2075a3f2a to your computer and use it in GitHub Desktop.
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 (AVG(TIME_TO_SEC(TIMEDIFF(`lead_routings`.`claimed_at`, `lead_routing_agent`.`notified_at`)))) from `lead_routings` JOIN `lead_routing_agent` ON `lead_routing_agent`.`lead_routing_id` = `lead_routings`.`id` WHERE `lead_routings`.`route_team_id` = :team_id AND `lead_routing_agent`.`notified_at` IS NOT NULL AND `lead_routings`.`claimed_by_kwuid` = :kwuid; |
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 (AVG(TIME_TO_SEC(TIMEDIFF(`lead_routings`.`first_interaction_at`, `lead_routings`.`claimed_at`)))) from `lead_routings` WHERE `lead_routings`.`route_team_id` = :team_id AND `lead_routings`.`interaction_at` IS NOT NULL AND `lead_routings`.`claimed_by_kwuid` = :kwuid; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment