finish
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user