# ①找到1所对应的朋友 ②找到其朋友喜欢的页面 ③删选掉自己喜欢的页面# 可能朋友中存在喜欢同样的界面SELECTdistinct page_id recommended_page
FROM Likes
WHERE user_id in(SELECT user2_id user1_id
FROM Friendship
WHERE user1_id=1UNIONALLSELECT user1_id
FROM Friendship
WHERE user2_id=1)AND page_id NOTin(SELECT page_id
FROM Likes
WHERE user_id=1)
1.3 运行截图
2 向公司CEO汇报工作的所有人
2.1 题目内容
2.1.1 基本题目信息
2.1.2 示例输入输出
2.2 示例sql语句
# ①先找出直接汇报的员工 ②找出间接一次汇报的员工 ③找出间接二次汇报的员工SELECT employee_id
FROM Employees
WHERE manager_id=1AND employee_id !=1UNIONALLSELECTdistinct employee_id
FROM Employees
WHERE manager_id IN(SELECT employee_id
FROM Employees
WHERE manager_id=1AND employee_id !=1)UNIONALLSELECTdistinct employee_id
FROM Employees
WHERE manager_id IN(SELECTdistinct employee_id
FROM Employees
WHERE manager_id IN(SELECT employee_id
FROM Employees
WHERE manager_id=1AND employee_id !=1))
2.3 运行截图
3 找到连续区间的开始和结束数字
3.1 题目内容
3.1.1 基本题目信息
3.1.2 示例输入输出
3.2 示例sql语句
# 连续数字可以考虑用笛卡尔积做,连续区间就代表头节点-1不在表里面 尾节点+1也不在表里面# 注意:单独数字也要成立一个区间SELECT a.log_id start_id,min(b.log_id) end_id
FROM(SELECT log_id
FROM Logs
WHERE log_id-1NOTin(SELECT log_id
FROM Logs
))a
CROSSJOIN(SELECT log_id
FROM Logs
WHERE log_id+1NOTin(SELECT log_id
FROM Logs
))b
ON b.log_id>=a.log_id
GROUPBY a.log_id
如图,在 △ A B C \triangle ABC △ABC 中, A C > 5 , A B > A C AC>5,AB>AC AC>5,AB>AC,点 E E E 是 A B AB AB 上一点,链接 C E CE CE,将 △ B C E \triangle BCE △BCE 沿 C E CE CE 折叠&…
文章目录 Multi-view Local Co-occurrence and Global Consistency Learning Improve Mammogram Classification Generalisation摘要本文方法global consistency modulelocal co-occurrence module (LCM) 实验结果 Multi-view Local Co-occurrence and Global Consistency Lear…