Skip to content

Instantly share code, notes, and snippets.

@kate-kate
Last active August 29, 2015 14:02
Show Gist options
  • Save kate-kate/03893b65a3e1d52444dc to your computer and use it in GitHub Desktop.
Save kate-kate/03893b65a3e1d52444dc to your computer and use it in GitHub Desktop.
SELECT FLOOR( call.created_at % ( 3600 *24 ) ) AS `interval` , COUNT( * ) AS c, call.campaign_id, campaign.name
FROM `call`
LEFT JOIN `campaign` ON campaign.id = call.campaign_id
WHERE 1
GROUP BY `interval` , campaign_id
@mitalcoi
Copy link

mitalcoi commented Jun 5, 2014

o, so great! thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment