摘要: 620. 有趣的电影 - 力扣(LeetCode) select id, movie, description, rating from cinema where id%2=1 and description != 'boring' order by rating desc 注意奇数的定义,余数为1 阅读全文
posted @ 2025-07-14 21:19 arroa 阅读(0) 评论(0) 推荐(0)
摘要: 1978. 上级经理已离职的公司员工 - 力扣(LeetCode) select t.employee_id from ( select employee_id, manager_id, salary from Employees where salary < 30000 AND manager_i 阅读全文
posted @ 2025-07-13 19:15 arroa 阅读(2) 评论(0) 推荐(0)
摘要: 1667. 修复表中的名字 - 力扣(LeetCode) select user_id, concat(upper(left(name,1)),lower(right(name,length(name)-1))) as name from Users order by user_id left(na 阅读全文
posted @ 2025-07-13 16:13 arroa 阅读(1) 评论(0) 推荐(0)
摘要: 1731. 每位经理的下属员工数量 - 力扣(LeetCode) select e2.employee_id, e2.name, COUNT(e1.employee_id) AS reports_count, round(avg(e1.age),0) as average_age FROM Empl 阅读全文
posted @ 2025-07-13 12:59 arroa 阅读(1) 评论(0) 推荐(0)
摘要: 2356. 每位教师所教授的科目种类的数量 - 力扣(LeetCode) select teacher_id, count(distinct subject_id) as cnt from Teacher GROUP BY teacher_id 按照老师id分类 1141. 查询近30天活跃用户数 阅读全文
posted @ 2025-07-13 09:37 arroa 阅读(2) 评论(0) 推荐(0)
摘要: 1378. 使用唯一标识码替换员工ID - 力扣(LeetCode) SELECT e2.unique_id as unique_id, e1.name as name FROM Employees e1 -- LEFT JOIN EmployeeUNI e2 -- ON e1.id = e2.id 阅读全文
posted @ 2025-07-12 15:41 arroa 阅读(2) 评论(0) 推荐(0)
摘要: 1757. 可回收且低脂的产品 - 力扣(LeetCode) select product_id from Products where low_fats = 'Y' and recyclable = 'Y' 下面是一种较为复杂的做法,不推荐 # Write your MySQL query sta 阅读全文
posted @ 2025-07-12 13:15 arroa 阅读(1) 评论(0) 推荐(0)
摘要: 工具叫 Portainer,只需要在官网上下载一个配置文件,然后 apply 这个文件就好了。 那么问题来了,我们用 Windows 下载的文件怎么上传到虚拟机? 使用scp命令scp \path\of\your\file username@ip:/dir 如果是直接复制到根目录可以scp \pat 阅读全文
posted @ 2025-07-11 21:34 arroa 阅读(6) 评论(0) 推荐(0)
摘要: 使用 Service 提供外部服务 Pod 使用的是一个集群内部的 IP 地址,如果用 Pod 来运行 nginx 是无法从集群外部访问到页面的。比如上面创建的 Pod,在 Master 节点上执行curl ip就可以访问到 nginx 页面。 但 exit 退出到 PowerShell 后就无法访 阅读全文
posted @ 2025-07-11 21:30 arroa 阅读(8) 评论(0) 推荐(0)
摘要: Kubernetes 调试命令和技巧 查看日志:sudo kubectl logs podName exec命令:以交互式的方式进入 Pod 中的一个容器,并启动一个 Bash shell。sudo kubectl exec -it podName -- /bin/bash ubuntu@k3s:~ 阅读全文
posted @ 2025-07-11 21:24 arroa 阅读(0) 评论(0) 推荐(0)