I’m looking at the RR diagram from https://duckdb.org/docs/sql/statements/select#full-syntax-diagram:
What would this look like in a grammar if we were to jus take the top-level items? My difficulty is in how the set-operation looks sort of removed from the others. Perhaps it could be the following?
select:
[ common-table-expr ]
{ select-node | values-list | set-operation }
If so though, the following doesn’t make sense because it should be something like:
select set-operation select
What should this be?