【发布时间】:2020-07-23 13:46:07
【问题描述】:
我最终会弄明白,但我想把它放在那里: 这个查询:
SELECT distinct value e.siteid
FROM e IN c.events
where e.sensor = 'Air Temperature'
产生这个结果:
[ "07000619231FBD", "07000619236CDB", "09000619236C01", "09000619236BE3", "0A000619236BD7"]
此查询按预期工作:
select *
from c
where c.id not in ([ "07000619231FBD", "07000619236CDB", "09000619236C01", "09000619236BE3", "0A000619236BD7"])
但是组合,即子查询,会给出语法错误:
select *
from c
where c.id not in
(SELECT distinct value e.siteid
FROM e IN c.events
where e.sensor = 'Air Temperature')
我在这里错过了什么?
【问题讨论】:
标签: azure azure-cosmosdb azure-cosmosdb-sqlapi