【TDengine 使用环境】
生产环境
【TDengine 版本】
3.3.5.8
【操作系统以及版本】
Centos 7
【部署方式】容器
【集群节点数】
1
【集群副本数】
【描述业务影响】
【问题复现路径/shan】做过哪些操作出现的问题
【遇到的问题:问题现象及影响】
查询sum语句报错
【资源配置】
8核64G
【报错完整截图】
select
first(time) time,
*
from
(
select
time,
SUM(ess_on_grid) ess_on_grid,
SUM(pv_on_grid) pv_on_grid,
SUM(high_voltage) high_voltage,
SUM(charge_sale) charge_sale
from
(
select
time,
case
when meter_type = 1 then total_active_p
else 0
end as ess_on_grid,
case
when meter_type = 4 then total_active_p
else 0
end as pv_on_grid,
case
when meter_type = 5 then total_active_p
else 0
end as high_voltage,
case
when meter_type = 8 then total_active_p
else 0
end as charge_sale
from
(
select
time,
meter_type,
sum(total_active_p) total_active_p
from
st_meter
where
meter_type in (1, 4, 5, 8)
and time >= ‘2025-10-27 00:00:00’
and time <= ‘2025-10-28 00:00:00’
group by
time,
meter_type
order by
time asc ) t ) m
group by
time
order by
time asc) n
interval (5m);
