In my book the only thing a better sql needs is to start selects with the from clause. -‘from orders select orderid’ Which would make for better autocomplete among other things.
IMO it also needs to default destructive statements (update, delete) to one row limit, and you have to explicitly choose to override that.
In the last 10 years of my career, many a dev & prod databases have been accidentally harmed by an overzealous query.
This could also add a warning for "left-over" non-updated rows, for example if the developer signals that only one row should be updated, but the WHERE clause has many rows, its usually a sign of a missing unique key, something I've seen before as well.
I lean towards this idea but it might make non trivially joined queries harder to understand, since it shifts the select to the middle or the end of the query.
So you change:
1. What I want
2. Which tables
3. Which filter
4. What grouping
Putting what you want further down the list might be more confusing rather than less.
100% on restructuring to improve tooling. discoverability is the big thing we lack. from would be a little more verbose than necessary but otherwise yes!
In the last 10 years of my career, many a dev & prod databases have been accidentally harmed by an overzealous query.
This could also add a warning for "left-over" non-updated rows, for example if the developer signals that only one row should be updated, but the WHERE clause has many rows, its usually a sign of a missing unique key, something I've seen before as well.