You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$columns(concat('LID: ', toString(lid), ' | ', switch, ' ', mod, ' port ', toString(port), ' <=> ', r_switch, ' ', r_mod, ' port ', toString(r_port)) AS desc, median(lost_bw_pct) AS ratio) FROM $table WHERE $timeFilter AND dc = '$dc' AND port_type = 'spine' AND (lid, port) in (SELECT DISTINCT lid, port FROM $table WHERE $timeFilter AND host LIKE '%$host_type%' AND dc = '$dc' AND port_type = 'spine' GROUP BY lid,port ORDER BY max(lost_bw_pct) DESC LIMIT $top_count)
works only if added GROUP BY ALL
The text was updated successfully, but these errors were encountered:
$columns(concat('LID: ', toString(lid), ' | ', switch, ' ', mod, ' port ', toString(port), ' = ', r_switch, ' ', r_mod, ' port ', toString(r_port)) AS desc, median(lost_bw_pct) AS ratio) FROM $table WHERE $timeFilter AND dc = 'fpip3' AND port_type = 'spine' AND (lid, port) in (SELECT DISTINCT lid, port FROM $table WHERE $timeFilter AND dc = 'fpip3' AND port_type = 'spine' GROUP BY lid,port ORDER BY max(lost_bw_pct) DESC LIMIT 10)
generated SQL
SELECT
t,
groupArray((desc, ratio)) AS groupArr
FROM
(
SELECT
(intDiv(toUInt32(_time), 1) * 1) * 1000 AS t,
concat('LID: ', toString(lid), ' | ', switch, ' ', mod, ' port ', toString(port), ' = ', r_switch, ' ', r_mod, ' port ', toString(r_port)) AS desc,
median(lost_bw_pct) AS ratio
FROM default.ibstats_non_negative_rate
WHERE (_time >= toDateTime(1718009046)) AND (_time <= toDateTime(1718009946)) AND (_time >= toDateTime(1718009046)) AND (_time <= toDateTime(1718009946)) AND (dc = 'fpip3') AND (port_type = 'spine') AND ((lid, port) IN (
SELECT DISTINCT
lid,
port
FROM default.ibstats_non_negative_rate
WHERE (_time >= toDateTime(1718009046)) AND (_time <= toDateTime(1718009946)) AND (_time >= toDateTime(1718009046)) AND (_time <= toDateTime(1718009946)) AND (dc = 'fpip3') AND (port_type = 'spine')
GROUP BY
lid,
port
ORDER BY max(lost_bw_pct) DESC
LIMIT 10
))
^^^^^^^ GROUP BY t, desc ^^^^^ missing here
)
GROUP BY t
ORDER BY t ASC
$columns(concat('LID: ', toString(lid), ' | ', switch, ' ', mod, ' port ', toString(port), ' <=> ', r_switch, ' ', r_mod, ' port ', toString(r_port)) AS desc, median(lost_bw_pct) AS ratio) FROM $table WHERE $timeFilter AND dc = '$dc' AND port_type = 'spine' AND (lid, port) in (SELECT DISTINCT lid, port FROM $table WHERE $timeFilter AND host LIKE '%$host_type%' AND dc = '$dc' AND port_type = 'spine' GROUP BY lid,port ORDER BY max(lost_bw_pct) DESC LIMIT $top_count)
works only if added
GROUP BY ALL
The text was updated successfully, but these errors were encountered: