Slackbot
01/04/2024, 4:42 PMNicolas Rakover
01/04/2024, 4:43 PMWITH
left_table AS (select metric, value, event_time from system.asynchronous_metric_log where metric = 'DiskTotal_default' and toSecond(event_time) == 0 and modulo(toMinute(event_time),5) == 0 limit 288),
right_table AS (select metric, value, event_time from system.asynchronous_metric_log where metric = 'DiskUsed_default' and toSecond(event_time) == 0 and modulo(toMinute(event_time),5) == 0 limit 288)
SELECT
r.value / l.value as value, l.event_time FROM left_table AS l
LEFT JOIN right_table AS r ON l.event_time = r.event_time;
Nicolas Rakover
01/04/2024, 4:43 PMSrikanth Chekuri
01/04/2024, 11:40 PM