Skip to content

Instantly share code, notes, and snippets.

@asigatchov
Created November 4, 2016 19:27
Show Gist options
  • Save asigatchov/e07627a725e470a830aec24f27d0f241 to your computer and use it in GitHub Desktop.
Save asigatchov/e07627a725e470a830aec24f27d0f241 to your computer and use it in GitHub Desktop.
error_page
SELECT
toStartOfHour(datetime) AS hours,
code,
count() AS error_count,
bar(error_count, 0, 500) AS error
FROM access_log
WHERE (event_date = '2016-11-01') AND (code > 399) AND (code < 599)
GROUP BY
hours,
code
ORDER BY hours ASC
LIMIT 20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment