some adding in sql

This commit is contained in:
Basyrov Rustam
2024-12-19 10:07:05 +03:00
parent 47160a20ed
commit 0d79da2555

View File

@@ -204,7 +204,9 @@ select
m.name_mop,
-- приведение к timestamp для фильтрации в datalens
cast(to_timestamp(created_at) as timestamp) as datetime,
extract(epoch from diff_time) as diff_time
-- datalens не поддерживает тип данных interval
extract(epoch from diff_time) as diff_time,
avg(extract(epoch from diff_time)) over(partition by r.rop_name, m.name_mop) as avg_diff_time
from
-- обычный INNER JOIN трех таблиц
final_table2 as ft2