Describe the bug
Marimo's SQL static analysis fails on valid DuckDB syntax using unnest with JSON access.
Error:
sqlglot.errors.OptimizeError: Alias already used:
Will you submit a PR?
Environment
Details
Replace this line with the output of marimo env. Leave the backticks in place.
Code to reproduce
import marimo as mo
import duckdb
duckdb.sql("""
SELECT unnest([1,2,3])->>'$'
FROM (SELECT 1)
""").fetchall()
-- error can be reproduced in SQL cell too