SubQuery In presto


SELECT
id,(select something
from table2 
where table2.id = table.id) AS "Description"
FROM table

我收到此错误:

presto error: Scalar sub-query has returned multiple rows

如何在presto中编写子查询?

Presto确实支持嵌套查询。我认为问题是你的语义。

您正在尝试从嵌套查询中投影某些内容,并且它需要一个标量值。

可能是这样的——

select
id, desc from 
(select table.id as id, something as desc
from table2 
where table2.id = table.id)

相关内容

  • 没有找到相关文章

最新更新