This commit is contained in:
Basyrov Rustam
2024-12-18 23:11:23 +03:00
parent 38c32701e7
commit 47160a20ed

View File

@@ -173,7 +173,7 @@ with final_table2 as
-- нумерация записей внутри сделки, чтобы все сделки начинались с сообщения клиента
row_number() over(partition by entity_id order by created_at) as num
from
chat_messages cm
db1.test.chat_messages cm
order by entity_id, created_at)
select
*,
@@ -204,7 +204,7 @@ select
m.name_mop,
-- приведение к timestamp для фильтрации в datalens
cast(to_timestamp(created_at) as timestamp) as datetime,
diff_time
extract(epoch from diff_time) as diff_time
from
-- обычный INNER JOIN трех таблиц
final_table2 as ft2