数据导入导出
报错记录
ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
参考教程:
- https://blog.youkuaiyun.com/u011677147/article/details/64129606
secure_file_priv = NULL
https://blog.youkuaiyun.com/weixin_39631030/article/details/79873936
https://blog.youkuaiyun.com/qq_35246620/article/details/78148505
练习一:各部门工资最高的员工
练习二: 换座位
练习三: 分数排名
#使用函数
SELECT score,
DENSE_RANK() OVER(ORDER BY score DESC) AS 'Rank'
FROM scores;
#Rank 不带引号 会报错
SELECT score,
(SELECT count(DISTINCT score)
FROM scores AS b
WHERE b.Score >= a.Score) 'Rank'
FROM scores AS a
ORDER BY score DESC;
练习四:连续出现的数字
练习五:树节点
练习六:至少有五名直接下属的经理