秋天的震撼已经感受到了😅😅😅
秋天的震撼已经感受到了😅😅😅
全部文章
分类
归档
标签
去牛客网
登录
/
注册
秋天的震撼已经感受到了😅😅😅的博客
全部文章
(共31篇)
题解 | 问GPT之前先动手画个表格把关系梳理清楚
select name u_n,lo.date date,sum(number)over(partition by lo.user_id order by lo.date) ps_num from login lo right join passing_number pn on lo.user_id...
SQL错题
2023-12-05
1
247
题解 | #牛客每个人最近的登录日期(四)#
# 每个日期 新登录个数 /*SELECT dates.date, IFNULL(new_users.new, 0) AS new FROM ( SELECT DISTINCT date FROM login ) AS dates LEFT JOIN ( SELECT f...
SQL错题
2023-12-03
0
229
题解 | where exists
SELECT ROUND( (SELECT COUNT(DISTINCT user_id) FROM login a WHERE EXISTS ( SELECT 1 FROM login AS b WHERE a...
SQL错题
2023-12-03
0
314
题解 | case的用法
SELECT e.emp_no, e.first_name, e.last_name, eb.btype, s.salary, CASE WHEN eb.btype = 1 THEN ROUND(s.salary * 0.1, 1) WHEN eb.btype = 2 THEN ...
SQL错题
2023-11-25
0
260
题解 | sum()over()累计求和
select emp_no,salary,sum(salary)over(order by emp_no) running_total from salaries where to_date='9999-01-01'
SQL错题
2023-11-25
1
235
题解 | %是一个运算符,用于返回除法的余数。
/*SELECT first_name FROM ( SELECT first_name, ROW_NUMBER() OVER (ORDER BY first_name) as row_num, ROW_NUMBER() OVER (ORDER BY emp_no) as original_...
SQL错题
2023-11-25
0
438
题解 | not exists
/*select em.emp_no emp_no,birth_date,first_name,last_name,gender,hire_date from employees em left join dept_emp de on em.emp_no=de.emp_no where dept_n...
SQL错题
2023-11-23
0
268
题解 | limit+查询行数 offset+跳过前几行
select * from employees limit 5 offset 5
SQL错题
2023-11-23
0
228
题解 | 聚合函数不能直接在where字句中使用
select avg(salary) avg_salary from salaries where to_date='9999-01-01' and salary>(select min(salary) from salaries where to_date='9999-01-01') and...
SQL错题
2023-11-23
0
273
题解 | SEPARATOR关键字用于指定连接时使用的分隔符
SELECT dept_no, GROUP_CONCAT(emp_no SEPARATOR ',') AS employees FROM dept_emp GROUP BY dept_no;
SQL错题
2023-11-22
0
213
首页
上一页
1
2
3
4
下一页
末页