Crosstab function in sql query editor is not recognised

Hi @MichaelU
I’m not sure I understand what you’re trying to do, but try putting the crosstab text query on a single line.
And you need to use "year" instead of year - it’s a reserved word https://www.postgresql.org/docs/current/sql-keywords-appendix.html