xXCalleManXx

Untitled

Oct 2nd, 2020
9,202
0
Never
2
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.44 KB | None | 0 0
  1. SELECT
  2.        p.name as projectName,
  3.        p.`key` AS projectKey,
  4.        CAST(SUM(timeSpentSeconds) / 3600 AS DECIMAL(10, 2)) as timeSpent
  5. FROM worklog w
  6. INNER JOIN project p ON p.`key` = SUBSTRING_INDEX(w.issueKey, '-', 1)
  7. WHERE
  8.   w.start >= DATE_ADD(LAST_DAY(DATE_SUB(NOW(), INTERVAL 2 MONTH)), INTERVAL 1 DAY) and
  9.   w.start < DATE_ADD(LAST_DAY(DATE_SUB(NOW(), INTERVAL 1 MONTH)), INTERVAL 1 DAY)
  10. GROUP BY p.`key`
  11. ORDER BY timeSpent DESC;
Advertisement
Comments
  • User was banned
  • User was banned
Add Comment
Please, Sign In to add comment