Skip to content

SQL: use of agg function in HAVING with no grouping emits wrong error message #57125

@bpintea

Description

@bpintea

A(n incorrect) query like SELECT salary FROM employees HAVING salary = count(1) will generate an error message, but a misleading one:
"Found 1 problem\nline 2:46: Cannot use WHERE filtering on aggregate function [count(1)], use HAVING instead".

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions