com.facebook.presto.sql.analyzer.SemanticException: ':input(1)' must be an aggregate expression or appear in GROUP BY clause

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via GitHub by martint
, 1 year ago
':input(1)' must be an aggregate expression or appear in GROUP BY clause
via GitHub by martint
, 1 year ago
'"id"' must be an aggregate expression or appear in GROUP BY clause
com.facebook.presto.sql.analyzer.SemanticException: ':input(1)' must be an aggregate expression or appear in GROUP BY clause
at com.facebook.presto.sql.analyzer.AggregationAnalyzer.analyze(AggregationAnalyzer.java:133)
at com.facebook.presto.sql.analyzer.StatementAnalyzer.verifyAggregations(StatementAnalyzer.java:1433)
at com.facebook.presto.sql.analyzer.StatementAnalyzer.analyzeAggregations(StatementAnalyzer.java:1394)
at com.facebook.presto.sql.analyzer.StatementAnalyzer.visitQuerySpecification(StatementAnalyzer.java:655)
at com.facebook.presto.sql.tree.QuerySpecification.accept(QuerySpecification.java:125)
at com.facebook.presto.sql.analyzer.StatementAnalyzer.visitQuery(StatementAnalyzer.java:409)
at com.facebook.presto.sql.tree.Query.accept(Query.java:103)
at com.facebook.presto.sql.analyzer.Analyzer.analyze(Analyzer.java:62)
at com.facebook.presto.execution.SqlQueryExecution.doAnalyzeQuery(SqlQueryExecution.java:274)
at com.facebook.presto.execution.SqlQueryExecution.analyzeQuery(SqlQueryExecution.java:260)
at com.facebook.presto.execution.SqlQueryExecution.start(SqlQueryExecution.java:224)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.