From
➡️On
➡️Join
➡️Where
➡️GroupBy
➡️Having
➡️Select
➡️Distinct
➡️OrderBy
➡️Limit
From:选择表
On:筛选数据,用于表链接
Join:表链接
Where:表过滤
GroupBy:表分组
Having:分组后过滤
Select:选择
Distinct:去重 OrderBy:排序 Limit:截取
Select tb1.e,…
From tb1
Join tb2 On tb1.a=tb2.b
Where tb1.c=tb2.d
GroupBy tb1.e Having tb1.e=1;