Skip to content

Instantly share code, notes, and snippets.

View diana-shealy's full-sized avatar

Diana Shealy diana-shealy

View GitHub Profile
SELECT
TD_TIME_FORMAT(time, ‘yyyy-MM’) as MONTH,
category,
usage
FROM usage_snapshot
WHERE TD_TIME_RANGE(time, ‘2016-04-01’)
SELECT
TD_TIME_FORMAT(time, ‘yyyy-MM’) as MONTH,
category,
MAX(usage) as total_max_usase
FROM usage_snapshot