ругается на instance_id(outer query column), запрос фейлится с ошибкой, говорит не может найти instance_id
SELECT project_id,
id AS uuid,
time,
bytes as size,
(SELECT argMax(instances.display_name, instances.id)
FROM instances
WHERE instances.id == egress_traffic.instance_id) AS display_name,
NULL AS type_name,
instance_id AS resource_uuid,
region
FROM egress_traffic
LIMIT 100;
SELECT project_id, id AS uuid, time, bytes as size, (SELECT argMax(instances.display_name, instances.id) FROM instances WHERE instances.id = instance_id) AS display_name, NULL AS type_name, instance_id AS resource_uuid, region FROM egress_traffic LIMIT 100; попробуйте так
сделайте словарь на instances и замените select на dictGet
Обсуждают сегодня