graph-node fails with invalid SQL expression error:
postgres-defi | 2024-09-07 20:45:32.788 UTC [91] ERROR: syntax error at or near "from" at character 205
postgres-defi | 2024-09-07 20:45:32.788 UTC [91] STATEMENT: insert into "sgd1"."stats_hour"(id, timestamp, block$, "count") select max(id) as id, timestamp, $3, count(*) as "count" from (select id, date_bin('3600s', timestamp, 'epoch'::timestamptz) as timestamp, from "sgd1"."block" where "sgd1"."block".timestamp >= $1 and "sgd1"."block".timestamp < $2 order by "sgd1"."block".timestamp) data group by timestamp
Bug report
If I have a single "count" aggregation:
graph-node fails with invalid SQL expression error:
Note "," before "from" that shouldn't be there.
Subgraph example: https://github.com/YaroShkvorets/common-subgraphs/tree/main/aggregation-broken
Relevant log output
No response
IPFS hash
No response
Subgraph name or link to explorer
No response
Some information to help us out
OS information
None