Skip to content

Instantly share code, notes, and snippets.

@diana-shealy
Created May 21, 2016 00:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diana-shealy/827ccfa33a6c3ab2bb4e664639658ebb to your computer and use it in GitHub Desktop.
Save diana-shealy/827ccfa33a6c3ab2bb4e664639658ebb to your computer and use it in GitHub Desktop.
SELECT
Month,
Group1,
Group2,
Group3,
CONCAT(Group1, “-”, Group2) as NewGroup,
SUM(Usage) as total_usage
FROM usage
GROUP BY 1, 2, 3, 4, 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment