写的顺序:select ... from... where.... group by... having... order by..执行顺序:from... where...group by... having.... select ... order by...
转载于:http://blog.csdn.net/liubo2012/article/details/8209324