1、from子句组装来自不同数据源的数据; 2、where子句基于指定的条件对记录行进行筛选; 3、group by子句将数据划分为多个分组; 4、使用聚集函数进行计算; 5、 使用having子句筛选分组; 6、计算所有的表达式(select语句); 7、使用order by对结果集进行排序