Skip to content

SQL: GROUPing BY YEAR function applied on a CASTed AS DATE field results in NULL values #49386

@astefan

Description

@astefan

SELECT YEAR(CAST(birth_date AS DATE)) FROM test_emp GROUP BY 1 results in

YEAR(CAST(birth_date AS DATE))
------------------------------------
null

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions