题解 | #浙江大学用户题目回答情况#

浙江大学用户题目回答情况

https://www.nowcoder.com/practice/55f3d94c3f4d47b69833b335867c06c1

方法一:嵌套子查询
select
  device_id,
  question_id,
  result
from
  question_practice_detail
where
  device_id in (
    select
      device_id
    from
      user_profile
    where
      university = '浙江大学'
  )
  order by question_id
方法二:连接查询
select
  q.device_id,
  q.question_id,
  q.result
from
  question_practice_detail q,
  user_profile u
where
  q.device_id = u.device_id
  and u.university = '浙江大学'
order by
  question_id
方法三:表连接查询
select
  q.device_id,
  q.question_id,
  q.result
from
  question_practice_detail q inner join
  user_profile u on q.device_id = u.device_id
where
  u.university = '浙江大学'
order by
  question_id
全部评论

相关推荐

11-03 13:18
门头沟学院 Java
包行:平时怎么刷算法题的哇,字节的手撕听说都很难
字节跳动工作体验
点赞 评论 收藏
分享
评论
16
12
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务