You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had searched in the issues 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)
Search before asking
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 , servresult INT NULL ) 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?
Code of Conduct
The text was updated successfully, but these errors were encountered: