select [all/distinct] 目標(biāo)列表達(dá)式
from 視圖/表名 as 別名
where 條件表達(dá)式
group by 分組
having 條件表達(dá)式
order by 列名 asc/desc
注:
①from是指定數(shù)據(jù)源(單數(shù)據(jù)源/多數(shù)據(jù)源勇蝙,由連接條件組成)
②where是面向行的操作
③select 是面向列的操作
通過select和where選擇合適的數(shù)據(jù)?
④group by 是分組脚囊,having對分組后的數(shù)據(jù)進(jìn)行過濾听皿,where對分組前的數(shù)據(jù)進(jìn)行過濾
⑤order by 降序desc? ? ?升序asc