Skip to content

Instantly share code, notes, and snippets.

@btbytes
Forked from sreedharg/gist:626267
Created October 14, 2010 14:40
Show Gist options
  • Save btbytes/626268 to your computer and use it in GitHub Desktop.
Save btbytes/626268 to your computer and use it in GitHub Desktop.
select meter_id, substring(logtime,1,7) month, max(demand)
from 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