🏡K
Size: a a a
🏡K
🏡K
🏡K
select
groups.*,
COUNT(*) FILTER (where status in ('ACTIVE','ONLINE')) AS active,
COUNT(*) FILTER (where status in ('DISCHARGED','WARN','ABNORMAL')) AS warn,
COUNT(*) FILTER (where status in ('OFFLINE', 'ERROR')) AS inactive,
(select COUNT(*) from sensor_instances where sensor_instances.groupid = groups.id) AS count
from
groups
left join sensor_instances si on groups.id = si.groupid
group by groups.id
ИК

B
ИК
B

ИК
ИК
ИК
B
B

B
AG
V
<

AG