Hi. I tried to use an SQL Pivot-statement (PIVOT ... ON ... USING) within an SQL Cell in a Notebook. I get Error: Parser Error: syntax error at or near "PIVOT", and it looks like perhaps that Statement is not supported by the DuckDB-Wasm that is included in Notebooks?
I checked the stdlib, which says that DuckDB-Wasm v 1.24 is included in Observable. I then checked with the DuckDB-Wasm documentation and the Browser demo-Prompt, which runs on v1.2.0 does in fact support PIVOT (I just hacked in the PIVOT-example from here and it works).
Whatâs a bit strange is that when I run SELECT version() AS version; inside an SQL cell in a notebook, I get v0.0.1-dev0, whereas in the demo-Prompt I get v1.2.0, so perhaps indeed the Notebook-DuckDB-Wasm-Version is somewhat outdated?
Weâre unfortunately still in the process of resolving an issue where range requests are incorrectly served from compressed files, which causes errors in Safari when file attachments are used with a newer version of DuckDB.
OK, so then it is indeed 1.24, so I donât get why the PIVOT command then doesnât work⌠I tried this in Chrome, so I donât see a link to the Safari error that you quote. Thanks.
Thanks for checking! I think the problem in Safari only shows itself with file attachments that get compressed at rest (which isnât the case for every MIME type and requires a certain effective reduction in size).