ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
**查询基本语法:** ```sql select [all | distinct] select_expr, select_expr, ... from table_name [ [inner] join table_name on on_condition | left [outer] join table_name on on_condition | right [outer] join table_name on on_condition | full [outer] join table_name on on_condition | cross join table_name [and and_condition] ] [where where_condition] [group by col_list] [having having_condition] [ order by col_list [asc | desc] | sort by col_list [asc | desc] | distribute by col_list sort by col_list [asc | desc] | cluster by col_list ] [limit number] ``` <br/> **执行顺序:** ```sql 第一步: from <left_table> 第二步: on <join_condition> 第三步: <join_type> join <right_table> 第四步: where <where_condition> 第五步: group by <group_by_list> 第六步: having <having_condition> 第七步: select 第八步: distinct <select_list> 第九步: order by <order_by_condition> 第十步: limit <limit_number> ```