Why is it necessary to precede group by before order by and not vice versa in a sql query?? as the foll code gives an error select name from student order by age group by name;
Why do think about it? Your question could also be: Why can't we write "FROM Student SELECT name"? But it is clear: ORDER BY works on the resultset so it should be at the end of the statement.
Another way to look at it is that, that is just the way the syntax is. In LINQ queries, the syntax starts with the from clause as WebFred suggested. Doesn't matter how the server processes the query or how the physical processing takes place, it is just that the syntax rules require it.