Changes between Initial Version and Version 1 of AdvancedReport18


Ignore:
Timestamp:
12/28/25 23:20:08 (6 days ago)
Author:
211101
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AdvancedReport18

    v1 v1  
     1===== Сметки со највисоко вкупно трошење во изминатата година
     2{{{#!sql
     3SELECT
     4    ta.account_name,
     5    SUM(tb.spent_amount) AS total_spent
     6FROM
     7    transaction_breakdown tb
     8JOIN transaction t ON tb.transaction_id = t.transaction_id
     9JOIN transaction_account ta ON tb.transaction_account_id = ta.transaction_account_id
     10WHERE
     11    t.date >= NOW() - INTERVAL '1 YEAR'
     12GROUP BY
     13    ta.account_name
     14ORDER BY
     15    total_spent DESC
     16LIMIT 10;
     17}}}