Wilson-BT opened a new issue, #13735: URL: https://github.com/apache/doris/issues/13735
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and found no similar issues. ### Version 1.1.3 ### What's Wrong? when i exec this sql ``` select a.shop_no,a.attribute_detail_no as channel_detail_no,channel_detail_name from ( select shop_no, max(attribute_no) attribute_no, max(attribute_detail_no) attribute_detail_no from retail_mdm_ods.shop_extension where flag=8 and status=1 and attribute_no IN ('20160420000004') group by shop_no ) a join ( select attribute_detail_no as channel_detail_no,`name` as channel_detail_name from retail_mdm_ods.shop_attribute_detail where attribute_no IN ('20160420000004') and status=1 ) b on a.attribute_detail_no=b.attribute_detail_no ``` Will raise error msg like ```Unknown column 'attribute_detail_no' in 'b'```. But when i exec sql according to the above sql,like ``` select a.organ_new_no,a.organ_short_name,b.channel_detail_no,b.channel_detail_name from ( select * from dasuan_analysis_data.dim_main_brand_org_info )a left join( select a.shop_no,a.attribute_detail_no as channel_detail_no,channel_detail_name from ( select shop_no, max(attribute_no) attribute_no, max(attribute_detail_no) attribute_detail_no from retail_mdm_ods.shop_extension where flag=8 and status=1 and attribute_no IN ('20160420000004') group by shop_no ) a join ( select attribute_detail_no as channel_detail_no,`name` as channel_detail_name from retail_mdm_ods.shop_attribute_detail where attribute_no IN ('20160420000004') and status=1 ) b on a.attribute_detail_no=b.attribute_detail_no )b ON a.organ_new_no=b.shop_no ```. The Sql will exec successful. ... So,as , i see the sql parse on join or table alisa has some bugs. ### What You Expected? Sql parse correct ### How to Reproduce? _No response_ ### Anything Else? _No response_ ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org