Created
April 1, 2021 17:05
-
-
Save all4miller/67ec5959a57cffc93197a79fbb77b0ef 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
def average_time_in_hours_to_2_or_more_views | |
Businesss.where.not(date_achieved_2_views: nil).pluck('sum(abs(extract(epoch from created_at - date_achieved_2_links)/3600)) / count(*)').first | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment