web: fixed cursed-query

This commit is contained in:
radex 2024-07-09 00:01:41 +02:00
parent 670313a54c
commit 4d360bb5e4
Signed by: radex
SSH key fingerprint: SHA256:hvqRXAGG1h89yqnS+cyFTLKQbzjWD4uXIqw7Y+0ws30

View file

@ -21,7 +21,7 @@ monthly_incomes as (
dt,
sum(amount_c)/100.0 as month_balance_i
from transfer3
where to_name not like '%PSP Zjednoczenie%' and amount_c > 0
where to_name !~* 'zj ?ednoczenie' and amount_c > 0
group by dt order by dt
),
monthly_rest as (
@ -29,7 +29,7 @@ monthly_rest as (
dt,
sum(amount_c)/100.0 as month_balance_r
from transfer3
where to_name not like '%PSP Zjednoczenie%' and amount_c < 0
where to_name !~* 'zj ?ednoczenie' and amount_c < 0
group by dt order by dt
),
monthly_psp as (
@ -37,7 +37,7 @@ monthly_psp as (
dt,
sum(amount_c)/100.0 as month_balance_p
from transfer3
where to_name like '%PSP Zjednoczenie%'
where to_name ~* 'zj ?ednoczenie'
group by dt order by dt
),
joined as (