常用的SQL语法:
数据查询:(select from、where-in、where-=、where- 大于小于、where- between and、where- 除了(<>/!/not in)、where- like )
数据分组查询:gruop by、gruop having、count的灵活运营
数据提取
1.select _ form table name
2.order by _/order by_ desc
3.limit _
4.where (excel中的筛选)
where _ =_
where _>/<_
where _ between _ and _
where _ in_
(in和between的区别是?)
如果想要不等于有两种形式
where _<>/!/not in _
多条件查找
where _
and/or _
当and和or同时出现时,and是优先执行的条件
多条件查询时用()来圈定条件
模糊查找
where _ like %_% 代表包含什么
%就是EXCEL中的*
分组=数据透视表
gruop by _ 以什么为左下角的那个
某些软件要求 select * from中的*必须等同于by 后面的字符



gruop by 之后要有筛选的按钮需要用到Having,并且having 后面是可以加and在进行过滤的
问题,找到城市中电子商务的岗位数量
select rdsldkjf count(1) from _
group by rdsldkjf
and rdsldkjf ="电子商务"
正答:
select rdsldkjf count(1) from _
where rdsldkjf like "%电子商务%"
group by rdsldkjf

上下两者的差异在于运行结果的时候。
前者的数字是包含电子商务的数量
后者是只包括了城市的数量

问:不同城市的电商岗位占据不同城市的占比



网友评论