Last active
April 9, 2018 21:38
-
-
Save martyndavies/d4acbb242133e33f832c678ad1850163 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 sum(query_count) | |
FROM (( | |
SELECT query_count | |
FROM rollups_5min | |
WHERE timestamp >= $1 AND timestamp < $2 AND app_id = $3 | |
) UNION ALL ( | |
SELECT query_count | |
FROM rollups_1day | |
WHERE timestamp >= $1 AND timestamp < $2 AND app_id = $3 | |
)) a... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment