Skip to content

Instantly share code, notes, and snippets.

@sreedharg
Created October 14, 2010 14:39
Show Gist options
  • Save sreedharg/626267 to your computer and use it in GitHub Desktop.
Save sreedharg/626267 to your computer and use it in GitHub Desktop.
select meter_id, substring(logtime,1,7) month, max(demand)
from wd_ips.logdata
group by meter_id, substring(logtime,1,7)
order by meter_id, month
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment