SQL是否支持GROUP By与LEFT JOIN共用

已创建edgex流propertyInforPubProfile ,从edgex获取设备上线的事件,想要通过LEFT JOIN方式获取设备名称。
SQL如下:
SELECT deviceId,iot_device.name as deviceName FROM (
SELECT meta(deviceName) AS deviceId, latest(onlineStatus) as onlineStatusL FROM propertyInforPubProfile WHERE onlineStatusL = 1 GROUP BY deviceId,TUMBLINGWINDOW(ss, 10)
) LEFT JOIN iot_device ON deviceId = iot_device.device_key
报错信息如下:
Update rule error: Invalid rule json: Parse SQL SELECT deviceId,iot_device.name as deviceName FROM ( SELECT meta(deviceName) AS deviceId, latest(onlineStatus) as onlineStatusL FROM propertyInforPubProfile WHERE onlineStatusL = 1 GROUP BY deviceId,TUMBLINGWINDOW(ss, 10) ) LEFT JOIN iot_device ON deviceId = iot_device.device_key error: found “(”, expected EOF…

不支持 subquery, 可通过 https://ekuiper.org/docs/zh/latest/guide/rules/rule_pipeline.html 实现类似功能