jfk9w-go / homebot Goto Github PK
View Code? Open in Web Editor NEWHome utilities.
License: MIT License
Home utilities.
License: MIT License
Заметил что при фильтрации по категории, для которой приходит пустое значение merchant, графики перестают отображаться.
Пример запроса:
with s as (select distinct on (id, time) id, time, account_amount
from debit d
left join shopping_receipt_items i on d.id = i.shopping_receipt_id
where category in ('Мобильная связь')
and merchant_name in ('')
and (i.name in ('__all__') or '__all__' in ('__all__'))),
t as (select date_trunc('month', time) as time,
sum(account_amount) as amount
from s
group by 1
order by 1),
u as (select time, amount, avg(amount) over (order by time rows between 12 preceding and 1 preceding) as avg_amount from t)
select time, (amount - avg_amount) / avg_amount as pir
from u
where time >= '2021-06-28T08:20:49.649Z'::timestamp - '1 month'::interval and time < '2022-07-28T08:20:49.649Z'
Ошибка возникает в условии merchant_name in ('') , т.к поле не равно пустой строке, приходит значение null
Для фикса необходимо во всех запросах где есть условие merchant_name in ([[merchant]]) заменить на coalesce(merchant_name, '') in ([[merchant]])
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.