Skip to content

Commit

Permalink
fix last 3month aggregation for ip addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
matyaskopp committed Nov 15, 2021
1 parent b3891b4 commit 1f9e0f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/db/ip.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ exports.getRecent = () => { /* return only last three months*/
ml1.cnt_units AS m1_units,
ml0.cnt_requests AS m0_requests,
ml0.cnt_units AS m0_units,
(coalesce(ml0.cnt_requests,0) + coalesce(ml2.cnt_requests,0) + coalesce(ml2.cnt_requests,0)) AS requests,
(coalesce(ml0.cnt_units,0) + coalesce(ml2.cnt_units,0) + coalesce(ml2.cnt_units,0)) AS units
(coalesce(ml0.cnt_requests,0) + coalesce(ml1.cnt_requests,0) + coalesce(ml2.cnt_requests,0)) AS requests,
(coalesce(ml0.cnt_units,0) + coalesce(ml1.cnt_units,0) + coalesce(ml2.cnt_units,0)) AS units
FROM
(
SELECT m.ip
Expand Down

0 comments on commit 1f9e0f8

Please sign in to comment.