diff --git a/postgres/categories.sql.go b/postgres/categories.sql.go index 7642991..a2bc73c 100644 --- a/postgres/categories.sql.go +++ b/postgres/categories.sql.go @@ -135,7 +135,7 @@ SELECT categories.id, categories.name, category_groups.name as group, SELECT SUM(t_this.amount) FROM transactions t_this WHERE categories.id = t_this.category_id - AND t_this.date BETWEEN $1 AND $2 + AND t_this.date >= $1 AND t_this.date < $2 ) , 0)::decimal(12,2) as activity, COALESCE( @@ -143,7 +143,7 @@ SELECT categories.id, categories.name, category_groups.name as group, SELECT SUM(a_hist.amount) FROM assignments a_hist WHERE categories.id = a_hist.category_id - AND a_hist.date BETWEEN $1 AND $2 + AND a_hist.date >= $1 AND a_hist.date < $2 ) ,0)::decimal(12,2) as assigned diff --git a/postgres/queries/categories.sql b/postgres/queries/categories.sql index 3a01632..d13a8d4 100644 --- a/postgres/queries/categories.sql +++ b/postgres/queries/categories.sql @@ -41,7 +41,7 @@ SELECT categories.id, categories.name, category_groups.name as group, SELECT SUM(t_this.amount) FROM transactions t_this WHERE categories.id = t_this.category_id - AND t_this.date BETWEEN @from_date AND @to_date + AND t_this.date >= @from_date AND t_this.date < @to_date ) , 0)::decimal(12,2) as activity, COALESCE( @@ -49,7 +49,7 @@ SELECT categories.id, categories.name, category_groups.name as group, SELECT SUM(a_hist.amount) FROM assignments a_hist WHERE categories.id = a_hist.category_id - AND a_hist.date BETWEEN @from_date AND @to_date + AND a_hist.date >= @from_date AND a_hist.date < @to_date ) ,0)::decimal(12,2) as assigned