Worth reading the thread, there are some good insights. It looks like he will be waiting on Postgres to take the initiative on implementing this before it makes it into a release.
> My goal is to keep SQLite relevant and viable through the year 2050. That's a long time from now. If I knew that standard SQL was not going to change any between now and then, I'd go ahead and make non-standard extensions that allowed for FROM-clause-first queries, as that seems like a useful extension. The problem is that standard SQL will not remain static. Probably some future version of "standard SQL" will support some kind of FROM-clause-first query format. I need to ensure that whatever SQLite supports will be compatible with the standard, whenever it drops. And the only way to do that is to support nothing until after the standard appears.
I choose never to meet this man and be disabused of this notion. Shine on, doctor.
Being able to do SELECT FROM WHERE in any order and allowing multiple WHEREs and AGGREGATE etc, combined with supporting trailing commas, makes copy pasting templating and reusing and code-generating SQL so much easier.
FROM table <-- at this point there is an implicit SELECT *
SELECT whatever
WHERE some_filter
WHERE another_filter <-- this is like AND
AGGREGATE something
WHERE a_filter_that_is_after_grouping <-- is like HAVING
ORDER BY ALL <-- group-by-all is great in engines that support it; want it for ordering too
...https://clickhouse.com/docs/en/guides/developer/alternative-...
BigQuery supports GROUP BY ALL and it really cleans up lots of queries. E.g.
SELECT foo, bar, SUM(baz)
FROM x
GROUP BY ALL <-- equiv to GROUP BY foo, bar
(eh, except MySQL; my memory of MySQL is it will silently do ANY_VALUE() on any columns that aren't an explicit aggregate function but are not grouped; argh it was a long time ago)Suppose...
SELECT brand, model, revision, SUM(quantity)
FROM stock
GROUP BY brand, model, revision
This is not solved by using distinct as you would not get the correct count.Group By All allows you to write it a bit more compact...
SELECT brand, model, revision, SUM(quantity)
FROM stock
GROUP BY ALL(The erstwhile code of conduct is now labeled a 'code of ethics', and AFAIK SQLite has no official CoC currently.)
Given that SQLite isn't really open to contribution (one of libsql's frustrations) it doesn't really worry me that they didn't & don't have a clear code of conduct. To me, digging through the repository [ETA: the website, rather] for what amounts to a cringey Easter egg and then linking to it as if it were a serious issue is uncalled for. To be honest, I think the complaints shouldn't stayed out of their announcement entirely - they have a legitimately cool vision for what their fork could be, and the complaints were only a distraction.
You didn't have to dig through the repository to find the CoC. It was right there on the website at /codeofconduct.html: https://web.archive.org/web/20180315125217/https://www.sqlit...
How is OR done with this WHERES?
Following the document itself, it should be rewritten if it ever intends to include other people, and should be explicitly clarified that the current form only applies to the author himself.
Really hope this takes off and gets more widespread adoption because I really want to stop doing:
SELECT *
FROM all_the_joins
into SELECT {my statements here}
FROM all_the_joinsI revert to “group by 1, 2, 3… “ when I’m just hacking about. Group by all would definitely be an improvement.