"statement":"select sum(amount), category from account_statement_v where fiscal_year = %(year)s group by category",
"params":{
'year':year
}
}
)
sum_related=dbGetOne(
dbh,
{
"statement":"select coalesce(sum(amount), 0::numeric(10,2)) as sum from account_statement_v where fiscal_year = %(year)s and category != 'nicht abrechenbare Positionen'",
"params":{
'year':year
}
}
)
sum_unrelated=dbGetOne(
dbh,
{
"statement":"select coalesce(sum(amount), 0::numeric(10,2)) as sum from account_statement_v where fiscal_year = %(year)s and category = 'nicht abrechenbare Positionen'",