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

GitHub | martint | 6 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Bad error message when SELECT * is used in GROUP BY query

    GitHub | 6 months ago | martint
    com.facebook.presto.sql.analyzer.SemanticException: ':input(1)' must be an aggregate expression or appear in GROUP BY clause
  2. 0

    do we have mongodb connector for prestodb?

    Google Groups | 2 years ago | Unknown author
    com.facebook.presto.sql.analyzer.SemanticException: line 1:8: SELECT * not allowed in queries without FROM clause

    Root Cause Analysis

    1. 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()
    2. presto-main
      StatementAnalyzer.visitQuerySpecification
      1. com.facebook.presto.sql.analyzer.AggregationAnalyzer.analyze(AggregationAnalyzer.java:133)
      2. com.facebook.presto.sql.analyzer.StatementAnalyzer.verifyAggregations(StatementAnalyzer.java:1433)
      3. com.facebook.presto.sql.analyzer.StatementAnalyzer.analyzeAggregations(StatementAnalyzer.java:1394)
      4. com.facebook.presto.sql.analyzer.StatementAnalyzer.visitQuerySpecification(StatementAnalyzer.java:655)
      5. com.facebook.presto.sql.analyzer.StatementAnalyzer.visitQuerySpecification(StatementAnalyzer.java:161)
      5 frames
    3. presto-parser
      AstVisitor.process
      1. com.facebook.presto.sql.tree.QuerySpecification.accept(QuerySpecification.java:125)
      2. com.facebook.presto.sql.tree.AstVisitor.process(AstVisitor.java:22)
      2 frames
    4. presto-main
      StatementAnalyzer.visitQuery
      1. com.facebook.presto.sql.analyzer.StatementAnalyzer.visitQuery(StatementAnalyzer.java:409)
      2. com.facebook.presto.sql.analyzer.StatementAnalyzer.visitQuery(StatementAnalyzer.java:161)
      2 frames
    5. presto-parser
      AstVisitor.process
      1. com.facebook.presto.sql.tree.Query.accept(Query.java:103)
      2. com.facebook.presto.sql.tree.AstVisitor.process(AstVisitor.java:22)
      2 frames
    6. presto-main
      QueuedExecution.lambda$start$1
      1. com.facebook.presto.sql.analyzer.Analyzer.analyze(Analyzer.java:62)
      2. com.facebook.presto.execution.SqlQueryExecution.doAnalyzeQuery(SqlQueryExecution.java:274)
      3. com.facebook.presto.execution.SqlQueryExecution.analyzeQuery(SqlQueryExecution.java:260)
      4. com.facebook.presto.execution.SqlQueryExecution.start(SqlQueryExecution.java:224)
      5. com.facebook.presto.execution.QueuedExecution.lambda$start$1(QueuedExecution.java:62)
      5 frames
    7. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      3. java.lang.Thread.run(Thread.java:745)
      3 frames