Skip to content

Instantly share code, notes, and snippets.

@mustafaakin
Created February 27, 2018 10:38
Show Gist options
  • Save mustafaakin/ac9e30211e30f9a96b090fad9724b61d to your computer and use it in GitHub Desktop.
Save mustafaakin/ac9e30211e30f9a96b090fad9724b61d to your computer and use it in GitHub Desktop.
SELECT sum(packets) AS total,
split_part(sourceaddress,’.’, 1) = ‘10’ AS isInternal,
action
FROM flows
GROUP BY 2, action
ORDER BY total DESC LIMIT 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment