Actually, LINQ's syntax is more closely based on XQuery than it is on SQL, and XQuery does it that way, too.
The main reasons have already been given: in C#, VB.NET and indeed most programming languages, scope flows from top to bottom and left to right, just the way we normally read. The way SQL is written, scope jumps around: an identifier gets already used in the SELECT
part of the query, but it only gets introduced later, in the FROM
part of the query. That's why the designers of XQuery decided to flip it around and LINQ just follows.
It also matches the mental model better: you have list of data sources (FROM
), then you filter out the data you're interested in (WHERE
), then you sort this data (ORDERBY
) and lastly you either project it into a different representation (SELECT
) or partition the results (GROUP BY
). After that, you can inject the results into the next query (INTO
).