Skip to content

Commit

Permalink
query: fix typo in personal issue history query (#487)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mini256 authored Jun 27, 2022
1 parent 9ef712d commit fd65d3d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/queries/personal-issues-history/template.sql
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ WITH issues AS (
FROM issue_comments
) sub
)
SELECT m.event_month, i.cnt AS issues, ic.cnt AS issues_comments
SELECT m.event_month, IFNULL(i.cnt, 0) AS issues, IFNULL(ic.cnt, 0) AS issue_comments
FROM event_months m
LEFT JOIN issues i ON m.event_month = i.event_month
LEFT JOIN issue_comments ic ON m.event_month = ic.event_month
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ WITH reviews AS (
GROUP BY event_month
ORDER BY event_month
)
SELECT r.event_month, r.cnt AS reviews, rc.cnt AS review_comments
SELECT r.event_month, IFNULL(r.cnt, 0) AS reviews, IFNULL(rc.cnt, 0) AS review_comments
FROM reviews r
JOIN review_comments rc ON r.event_month = rc.event_month

0 comments on commit fd65d3d

Please # to comment.