If a query have same macro multiple times, only the first occurrence is getting replaced.
For example, in the below query $__timeGroup(timestamp,3h) was expected to replaced thrice. but only the first instance was replaced.
SELECT $__timeGroup(timestamp,3h), "user", sum("value") as "value"
FROM "salesdata"
WHERE $__timeFilter("timestamp")
GROUP BY $__timeGroup(timestamp,3h), "user"
ORDER BY $__timeGroup(timestamp,3h) ASC
If a query have same macro multiple times, only the first occurrence is getting replaced.
For example, in the below query
$__timeGroup(timestamp,3h)
was expected to replaced thrice. but only the first instance was replaced.