shutao917 opened a new issue, #11159: URL: https://github.com/apache/doris/issues/11159
### 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.0 ### What's Wrong? `SELECT servdate AS servdate, SUM(CASE WHEN servresult = 5 THEN 1 ELSE 0 END) AS farrow_num, SUM(CASE WHEN servresult = 1 THEN 1 ELSE 0 END) AS repeat_num, SUM(CASE WHEN servresult = 4 THEN 1 ELSE 0 END) AS abort_num, SUM(CASE WHEN servresult IN (2,3) THEN 1 ELSE 0 END) AS npd_num, SUM(CASE WHEN servresult = 6 THEN 1 ELSE 0 END) AS death_num, SUM(CASE WHEN servresult = 7 THEN 1 ELSE 0 END) AS remove_num FROM yz_datawarehouse_dws.x1 GROUP BY servdate` get this error: errCode = 2, detailMessage = select list expression not produced by aggregation output (missing from GROUP BY clause?): sum(CASE WHEN `servresult` IN (2, 3) THEN 1 ELSE 0 END) table schema : `CREATE TABLE x1 ( servdate DATE NULL COMMENT "配种日期", servresult INT NULL COMMENT "配种结果名称" ) ENGINE=OLAP DUPLICATE KEY(`servdate`) COMMENT "OLAP" DISTRIBUTED BY HASH(`servdate`) BUCKETS 16 PROPERTIES ( "replication_allocation" = "tag.location.default: 3", "in_memory" = "false", "storage_format" = "V2" )` ### What You Expected? wrong ### 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: [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]
