Join 在ORACLE 11g中使用其中一个查询中的函数连接两个查询

Join 在ORACLE 11g中使用其中一个查询中的函数连接两个查询,join,oracle11g,Join,Oracle11g,运行后,会出现以下错误: select * from ( select no,item,desc,user from table where no=1 ) x , select no,item,desc,max(item_date),user from table where no=1 group by no,item,desc) y where x.no=y.no 您可以尝试以下操作: ORA-00904: "Y"."NO" invalid identifier 或: 当然,使用左/右/

运行后,会出现以下错误:

select * from ( select no,item,desc,user from table where no=1 ) x , 
select no,item,desc,max(item_date),user from table where no=1 group by no,item,desc) y where x.no=y.no

您可以尝试以下操作:

ORA-00904: "Y"."NO" invalid identifier
或:

当然,使用左/右/内联接取决于您希望数据联接的方式

select x.*, y.* from 
( select no,item,desc,user from table where no=1 ) x , 
(select no,item,desc,max(item_date),user from table where no=1 group by no,item,desc ) y 
where x.no=y.no
select x.*, y.* from 

( select no,item,desc,user from table where no=1 ) x 

left join

(select no,item,desc,max(item_date),user from table where no=1 group by no,item,desc ) y 

on x.no=y.no