TDengine icon indicating copy to clipboard operation
TDengine copied to clipboard

客户端执行partition by 聚合函数报错

Open lihison opened this issue 8 months ago • 0 comments

需求是获取每个测点的最新数据

SELECT time, value, point_id FROM ( SELECT time, value, point_id, ROW_NUMBER() OVER (PARTITION BY point_id ORDER BY time DESC) AS rn FROM model_vision.point ) t WHERE t.rn = 1; 但是报错了

Image

Image

lihison avatar Jun 12 '25 16:06 lihison