Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
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)