Forked from andrewchilds/gist:11831dc82093e53d41af
Last active
April 30, 2016 06:23
-
-
Save lukeasrodgers/e9f269f25e049f72a79897af43d9d3e8 to your computer and use it in GitHub Desktop.
Rollbar RQL Cheat Sheet
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
# List users by average and maximum session length. | |
SELECT person, max(client.runtime_ms), avg(client.runtime_ms) | |
FROM item_occurrence | |
GROUP BY 1 | |
ORDER BY 2 DESC | |
# List active date ranges for each deploy. | |
SELECT client.javascript.code_version, min(timestamp), max(timestamp) | |
FROM item_occurrence | |
GROUP BY 1 | |
# List top 100 user agent strings over last week | |
SELECT client.javascript.browser, count(*) | |
FROM item_occurrence | |
WHERE timestamp > unix_timestamp() - 60 * 60 * 24 * 7 | |
GROUP BY 1 | |
ORDER BY 2 DESC | |
# extract error message | |
SELECT body.message.body | |
FROM item_occurrence | |
WHERE item.counter = 6680 | |
ORDER BY timestamp DESC | |
LIMIT 0, 20 | |
# get 8 chars of error message after : | |
SELECT substring(body.message.body, locate(':', body.message.body), 8) | |
FROM item_occurrence | |
WHERE item.counter = 6680 | |
ORDER BY timestamp DESC | |
LIMIT 0, 20 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment