some adding in sql
This commit is contained in:
@@ -204,7 +204,9 @@ select
|
|||||||
m.name_mop,
|
m.name_mop,
|
||||||
-- приведение к timestamp для фильтрации в datalens
|
-- приведение к timestamp для фильтрации в datalens
|
||||||
cast(to_timestamp(created_at) as timestamp) as datetime,
|
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
|
from
|
||||||
-- обычный INNER JOIN трех таблиц
|
-- обычный INNER JOIN трех таблиц
|
||||||
final_table2 as ft2
|
final_table2 as ft2
|
||||||
|
|||||||
Reference in New Issue
Block a user