Akce
Podání #46037
otevřenýInfo o neodeslanych SMS - asi spatna cisla
Začátek:
29.01.2025
Uzavřít do:
% Hotovo:
90%
Odhadovaná doba:
Akce
#1
Aktualizováno uživatelem Andrej Ramašeuski před 25 dny(ů)
- Stav změněn z Nový na V řešení (diskutuje se)
- % Hotovo změněn z 0 na 90
create view octopus_users_view as select
* from dblink(
'dbname=octopus',
'SELECT
id,
username_clean,
official_last_name,
official_first_name,
''+420'' || REGEXP_REPLACE( REGEXP_REPLACE(REGEXP_REPLACE(phone, ''^(00420|[^0-9]*420)'', ''''), ''[^0-9]'', '''', ''g''),''^00'', '''') from people_person'
)
AS t1(id integer, username text, firstname text, lastname text, phone text);
create view "failed_messages_view" as select
number,
octopus_users_view.username,
octopus_users_view.firstname,
octopus_users_view.lastname,
count(*) from history
left join octopus_users_view on
(octopus_users_view.phone=number)
where status = 'failed' and ts>'2024-01-01'
group by (
number,
octopus_users_view.username,
octopus_users_view.firstname,
octopus_users_view.lastname
)
order by count(*)
desc;
grant select on failed_messages_view to "nocodb-view";
Akce