We're trying to join data from different SQL queries in a Query JSON with SQL resource, using the formatDataAsArray methods and AlaSQL to match the data. We've used this resource quite a few times and are familiar with the common pitfalls (e.g. case sensitivity)
Issue:
About a week or so ago, we noticed a syntax error in queries that had a HAVING clause - removing the having clause seemed to fix the issue. No other changes to the underlying resources seems to have occurred.
Steps I've taken to troubleshoot:
Updated the having clause to have a dummy condition, used aliases, moved the condition from a having to a CTE and where clause seemed to be the only way that worked.
Welcome to the community, @DennyK! Are you experiencing this issue on a self-hosted instance? If so, which version? Can you also clarify whether this is happening in an app or workflow?
Yep, I see the same thing and can confirm that the query does run in older versions. Something similar happened the last time we bumped the version of our AlaSQL library, so I imagine tracking down the breaking change will be fairly straightforward. I'll provide an update as soon as I have news to share!
For anybody else tracking this issue, the above workaround will keep your query running as it should.