Seddryck / Tseesecake

Tseesecake is a lightweight proxy for time-series query engines, supporting multiple database engines and storage providers, with a SQL dialect dedicated to time series
https://seddryck.github.io/Tseesecake
Apache License 2.0
2 stars 1 forks source link

Arranger to use a reference to a projection in the HAVING clause #81

Closed Seddryck closed 9 months ago

Seddryck commented 9 months ago

Following query is not valid in some dialects

SELECT
   WindPark,
   MAX(Produced) as Maximum
FROM
   WindEnergy
HAVING
   Maximum > 20;

In place it should be

HAVING
   MAX(Produced)> 20;

An arranger should be able to handle this case.