Skip to content

Instantly share code, notes, and snippets.

@jeffwray
Last active December 9, 2021 03:56
Show Gist options
  • Save jeffwray/90f8c390c39d304a91df5ae509a9a5a5 to your computer and use it in GitHub Desktop.
Save jeffwray/90f8c390c39d304a91df5ae509a9a5a5 to your computer and use it in GitHub Desktop.
Message Queue Processing - Determining the number of messages processed in an hour
SELECT DAY ( processed_on ) AS DAY,
HOUR ( processed_on ) AS HOUR,
count( id ) AS Count
FROM
messages
WHERE
processed_on BETWEEN :start_date AND :end_date
GROUP BY
DAY ( processed_on ),
HOUR ( processed_on )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment