-
-
Save urbanczykd/389bcca93aeb568e9ae0 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
named_scope :answered, :conditions => {:disposition => 1} | |
named_scope :missed, :conditions => {:disposition => 2} | |
Call.answered.count | |
=> 390357 | |
>> Call.missed.count | |
=> 48029 | |
>> Call.answered.missed.count | |
=> 48029 | |
SELECT count(*) AS count_all FROM `phone_call` WHERE (`phone_call`.`disposition` = 1) | |
SELECT count(*) AS count_all FROM `phone_call` WHERE (`phone_call`.`disposition` = 2) | |
SELECT count(*) AS count_all FROM `phone_call` WHERE ((`phone_call`.`disposition` = 2)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment