别踩我尾巴
别踩我尾巴
全部文章
分类
题解(9)
归档
标签
去牛客网
登录
/
注册
别踩我尾巴的博客
全部文章
(共25篇)
题解 | #格式化输出(三)#
str=input() print(str.strip()) strip()去前后空格
2023-08-29
0
292
题解 | #21年8月份练题总数#
主要是去重和字符串匹配distinct可以放在函数里,优先运算;字符串匹配 LIKE '' ,其中_匹配单个字符,%匹配多个。 SELECT COUNT( DISTINCT device_id) as did_cnt,count(question_id) as question_cnt from ...
2021-08-25
0
361
题解 | #将employees表中的所有员工的last_name和first_name通过引号连接起来。#
用两个concat即可 SELECT CONCAT(last_name,CONCAT("'",first_name)) as name from employees;
2021-08-23
0
395
题解 | #出现三次以上相同积分的情况#
两种方法:子查询和having区别在于group搭配where和having的顺序问题。where先执行,再groupby分组;groupby先分组,having再执行。——搭配where,嵌入子查询 SELECT T.number from( SELECT count(number) coun,n...
2021-08-23
0
395
题解 | #查找所有员工的last_name和first_name以及对应的dept_name#
用子查询与外连接 SELECT A.last_name,A.first_name,mp.dept_name from departments mp RIGHT JOIN ( SELECT e.last_name,e.first_name,d.dept_no from employees e LEF...
2021-08-20
0
399
首页
上一页
1
2
3
下一页
末页