▲ | hk1337 a day ago | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
First time seeing the from at the top of the query and I am not sure how I feel about it. It seems useful but I am so used to select...from. I'm assuming it's more of a user preference like commas in front of the field instead of after field? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
▲ | hamilton a day ago | parent | next [-] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
You can use any variation of DuckDB valid syntax that you want! I prefer to put from first just because I think it's better, but Instant SQL works with traditional select __ from __ queries. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
▲ | ltbarcly3 a day ago | parent | prev [-] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
Yes it comes from a desire to impose intuition from other contexts onto something instead of building intuition with that thing. SQL is a declarative language. The ordering of the statements was carefully thought through. I will say it's harmless though, the clauses don't have any dependency in terms of meaning so it's fine to just allow them to be reordered in terms of the meaning of the query, but that's true of lots and lots of things in programming and just having a convention is usually better than allowing anything. For example, you could totally allow this to be legal:
There's nothing ambiguous about it, but why? Like if you are used to seeing it one way it just makes it more confusing to read, and if you aren't used to seeing it the normal way you should at least somewhat master something before you try to improve it through cosmetic tweaks.I think you see this all the time, people try to impose their own comfort onto things for no actual improvement. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|