Skip to content

Instantly share code, notes, and snippets.

@julian1
Created May 25, 2015 02:42
Show Gist options
  • Save julian1/3df9981d2a1cb2a04279 to your computer and use it in GitHub Desktop.
Save julian1/3df9981d2a1cb2a04279 to your computer and use it in GitHub Desktop.
sudo -u postgres psql -d harvest -c 'select * from ( select m.ts_id,count(m.ts_id) from anmn_ts.measurement m group by m.ts_id order by ts_id limit 10 ) as data '
sudo -u postgres psql -d harvest -c 'select max(count) from ( select m.ts_id,count(m.ts_id) from anmn_ts.measurement m group by m.ts_id order by ts_id ) as data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment