【发布时间】:2021-11-07 22:02:49
【问题描述】:
select t.col1,b.somecolumn t.col2,a.col1,VQ.a,VQ.b,VQ.e,VQ.d,VQ.f,
(select t.status as a, p.id as b,p.permit as c, p.des as d, p.error_code as e, p.cause as f
from table_A t
inner join table_B p on t.a = p.a
where p.c = 'license' and t.status = 'Fail') as VQ
from table_A t
join table_C a on t.col1 = a.asset_id
join table_B b on t.somecolumn = b.somecolumn ;
当我执行上面的代码时,我遇到了错误
SQL Error [42601]: ERROR: navigation on column "vq" is not allowed as it is not SUPER type
我正在尝试在 select 中进行选择。
【问题讨论】:
-
请解释你想要完成的逻辑。样本数据和期望的结果会有所帮助。
标签: sql postgresql select subquery