Last active
September 15, 2016 16:58
-
-
Save alastaircoote/36b2eaa5cd12c06b4ade8354830c3a63 to your computer and use it in GitHub Desktop.
View schema for grouped log entries
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 | |
min(log_entries."time") AS "time", | |
max(log_entries.level) AS level, | |
jsonb_merge(log_entries.data) AS data, | |
json_agg(log_entries.msg) AS msg, | |
log_entries.req_id | |
FROM log_entries | |
GROUP BY log_entries.req_id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment