Skip to content

Instantly share code, notes, and snippets.

@luisuribe
Created March 17, 2012 17:21
Show Gist options
  • Save luisuribe/2063009 to your computer and use it in GitHub Desktop.
Save luisuribe/2063009 to your computer and use it in GitHub Desktop.
redmine queries
-- Select the sum of hours invested in a roadmap
select i.id, i.subject, s.name, sum(t.hours)
FROM issue_statuses s, issues i
LEFT JOIN time_entries t
ON (t.issue_id = i.id)
WHERE i.project_id = XX and i.fixed_version_id = XX
AND i.status_id = s.id
GROUP BY 1,2,3;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment