   [category-id]
   (jdbc/query db-spec
               ["SELECT EXTRACT(DOY from transactions.date) doy,
-               SUM(transactions.amount)
+               round(SUM(transactions.amount)::numeric, 2) AS amount
                FROM transactions WHERE category_id = ?
                AND EXTRACT(ISOYEAR FROM transactions.date) =
                 EXTRACT(ISOYEAR FROM current_date)

  (sha256 (apply str date amount description)))

(def week-grouping-query
  "SELECT date_trunc('week', t.date) AS Week , SUM(t.amount) AS total
  FROM transactions t
  WHERE t.date > now() - interval '1 year'
  GROUP BY Week

  [category-id]
  (jdbc/query db-spec
              ["SELECT EXTRACT(month FROM transactions.date) AS month,
               round(SUM(transactions.amount)::numeric, 2) AS amount
               FROM transactions WHERE category_id = ?
               GROUP by month ORDER
               BY month DESC" category-id]))
