Skip to content

Instantly share code, notes, and snippets.

@brianr
Last active August 29, 2015 14:18
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianr/d7e61965fca488636da8 to your computer and use it in GitHub Desktop.
Save brianr/d7e61965fca488636da8 to your computer and use it in GitHub Desktop.
RQL queries for deploys
-- select all deploys
select * from deploy;
-- select main columns for all deploys of a specific revision
select id, timestamp, environment, comment from deploy
where revision = 'some git sha here'
-- deploys of 'production' by revision, and when they were first and last deployed
-- ordered by most recent deploy first
select revision, count(*), min(timestamp), max(timestamp)
from deploy
where environment = 'production'
group by 1
order by 4 desc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment