sql中注意

1.有聚合函数(count sum avg max)的。不用where 用 group by xxx having count
2.group by必须放在 where 前面
3.筛选不同列的行数用count(distinct column_name)

你可能感兴趣的:(技术)