"group by is used to organize the data before other clauses - such as where, order by and functions -are applied. In contrast, order by is applied last- after the query has been resolved -to reorganize the query output for display.",really? Ref: Learning MySQL
I have surfed the net regarding this but couldn't find anything like this. Is this an error in book?
update: I just notices alias works in group by which means it is getting executed after select, since select is executed after where , can we safely say that it was an error with the book and group by is executed after where clause?