(Disclaimer: I'm a PRQL contributor.)
I'm more familiar with DuckDB and they've also been doing some great innovation on the SQL front. I don't know offhand if they can also do the forward referencing thing but they allow putting the FROM first and having GROUP BY ALL etc..
It's great to see all this innovation happening in the SQL and Query Language space more generally at the moment.
My impression of ClickHouse was that it was more like postgresql in that regard, i.e. OLAP : OLTP as ClickHouse : Postgres as DuckDB : SQLite.
clickhouse-local may have closed the gap on that though. Can you embed it in Python as a library?
https://github.com/chdb-io/chdb
pip install chdbI kinda wish for a database with ClickHouse storage, because MergeTree seems incredibly good at what it does and DuckDB optimizer, because the ClickHouse one has a lot of limitations.
[1]: https://duckdb.org/2023/05/26/correlated-subqueries-in-sql.h...
This video also covers many other advantages of ClickHouse's SQL dialect: https://www.youtube.com/watch?v=zhrOYQpgvkk
Some may find your first complaint questionable... But I specifically designed ClickHouse SQL to allow aliases to be used and referenced in every part of SQL query.
I'm quite aware of your advice regarding using `*` against tables. However, I'm talking about using `*` against subqueries and CTEs where the pieces of the table have already been extracted.
I was unable to edit this earlier due to HN being unavailable after I realized the formatter mangled it.
Complaint 1: Not being able to use selected columns later in the same select.
Instead: Complaint 2: Not being able to specify all columns except. This combines with the above, where I have to pull some intermediate calculations forward from a subquery, but I don't need them in the final output. So I have to then enumerate all the output columns that I actually want, instead of being able to say something like `* EXCEPT some_value`.