This is adapted from a comment I left on Hacker News. Why don’t we replace SQL with some other, better query language, perhaps something“equally powerful” like get name, age -> (foos.id X bars.foo_id) |> get first(name) |> head? Part of the point of SQL is that the database may choose to satisfy your query in a very different manner than you might expect given the procedural reading. The example query is a nice illustration; a modern relational database may move project/select steps ear...