给个offer行不行x
给个offer行不行x
全部文章
分类
sql(46)
算法题(26)
题解(2)
归档
标签
去牛客网
登录
/
注册
给个offer行不行x的博客
全部文章
(共45篇)
题解 | SQL14 操作符混合运用
可以利用括号,单独处理一部分的需求,然后再用or拼接起来。 select device_id, gender, age, university, gpa from user_profile where (gpa > 3.5 and university = '山东大学') or (gpa &g...
Mysql
2021-12-22
0
278
题解 | SQL13 Where in 和Not in
掌握where in的用法: where columns in (..., ..., ...) 括号表示一个集合(),在括号里的就表示在这个集合里。 select device_id, gender, age, university, gpa from user_profile where univ...
Mysql
2021-12-21
0
487
题解 | SQL12 高级操作符练习(2)
同上题类似,需要把and给成or select device_id, gender, age, university, gpa from user_profile where university = '北京大学' or gpa > 3.7;
Mysql
2021-12-20
0
256
题解 | SQL11 高级操作符练习(1)
这个where过滤的多条件判断,在判断条件之间加上and表示且的含义。 特别注意,在判断性别的时候,是=来判断是否相等,是一个等于号! select device_id, gender, age, university, gpa from user_profile where gender = 'm...
Mysql
2021-12-19
0
315
题解 | SQL10 用where过滤空值练习
空值过滤是一个很重要的知识点,一定要记住。 用is not null来对空值进行过滤 select device_id, gender, age, university from user_profile where age is not null;
Mysql
2021-12-19
0
317
题解 | SQL9 查找除复旦大学的用户信息
只获取不是复旦大学的信息就可以,所以直接用where university != '复旦大学'来判断就可以了。 select device_id, gender, age, university from user_profile where university != '复旦大学';
Mysql
2021-12-17
0
341
题解 | SQL8 查找某个年龄段的用户信息
这个也是带有过滤条件的查询数据。 有两种写法: 一种是age between ... and ... 另一种是age >= 20 and age <= 23 两种写法均可。 select device_id, gender, age from user_profile where age...
Mysql
2021-12-16
0
333
题解 |SQL7 查找年龄大于24岁的用户信息
和上一题类似,也是带有条件的,这次的条件是判断一个数字是否大于给定的数字,直接对age进行判断即可。 select device_id, gender, age, university from user_profile where age >= 24;
Mysql
2021-12-15
0
275
题解 | SQL6 查找学校是北大的学生信息
这是筛选条件的sql语句,而筛选条件是需要在前面包含列(即select后的字段)里面筛选。 筛选的条件需要放在where后面,由于是筛选的学校名,所以是wehre university='北京大学'; select device_id, university from user_profile wh...
Mysql
2021-12-14
0
518
题解 | SQL38 查找后降序排列
这题和上一题一样,但是需要主要把升序改成降序。 select device_id, gpa, age from user_profile order by gpa desc, age desc;
Mysql
2021-12-13
0
220
首页
上一页
1
2
3
4
5
下一页
末页