mmx1960 opened a new issue, #16536: URL: https://github.com/apache/doris/issues/16536
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues. ### Version 1.1.3 and 1.2.1 ### What's Wrong? when i wrapper "count" sql on an normal sql, i has throw an error:  ### What You Expected? execute success and reture an correct result ### How to Reproduce? create database tt; CREATE TABLE tt.test1 ( enum_type varchar(256) comment 'rr', enum_key varchar(256) comment 'rr', enum_value STRING comment 'rr', enum_status STRING comment 'rr' )UNIQUE KEY(enum_type,enum_key) comment 'test' DISTRIBUTED BY HASH(enum_type) BUCKETS 10 PROPERTIES("replication_num" = "1"); SELECT count(*) FROM (WITH t1 AS ( SELECT enum_key, ROUND(COUNT(1) / fff.sumResult,4) as cc, ROW_NUMBER() OVER(ORDER BY enum_key) as dd FROM tt.test1,(SELECT COUNT(1) as sumResult from tt.test1) fff GROUP BY enum_key ,fff.sumResult ) SELECT * FROM t1, (SELECT dd as aaa FROM t1 ORDER BY cc DESC limit 1 ) tableWithMaxId ORDER BY enum_key) t_295f8aee89x ### 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
