Issue Saving and Executing Valid Queries

I have the following query which works perfectly fine when I try to execute on AWS Athena. But having issues saving and executing the queries on Redash when we have “concat” keyword (Query 1 given below). Simple query without “concat” works fine (Query 2 given below). Similar and much complex queries were working fine earlier on same version of Redash.

Redash version: 8.0.0

Query 1:
SELECT cast(concat(cast(year(b.created_at) AS varchar),
cast(month(b.created_at)AS varchar)) AS bigint) yr_mon,
concat(cast(date_format(b.created_at,
‘%M’) AS varchar),’-’,cast(year(b.created_at) AS varchar))month_year, b.status, count(1) AS total
FROM rds.booking b
LEFT JOIN rds.user u
ON b.user_id=u.id
WHERE date(b.created_at)
BETWEEN date(‘2020-01-01’)
AND date(‘2020-09-01’)
GROUP BY 1, 2,3
ORDER BY 1,2,3

Query 2:
SELECT month(b.created_at), date_format(b.created_at, ‘%M’) month_name ,
b.status,
count(b.id) AS total
FROM rds.booking b
LEFT JOIN rds.user u ON b.user_id=u.id
WHERE date(b.created_at) BETWEEN date(’{{ booking_created_on.start }}’) AND date(’{{ booking_created_on.end }}’)
GROUP BY 1,
2,3
ORDER BY 1,2,3

There was a domain issue, The domain was pointing to multiple IPs on cloudflare.
disabled the proxy feature in cloudflare

1 Like