左连接,取category_id为null的记录

使用join查询方式找出没有分类的电影id以及名称

http://www.nowcoder.com/questionTerminal/a158fa6e79274ac497832697b4b83658

select f1.film_id,f1.title
from film f1
left join(
    select fc.film_id,fc.category_id
    from film_category as fc
    join category as c
    on fc.category_id=c.category_id
    ) f2
on f1.film_id=f2.film_id
where category_id is null
全部评论

相关推荐

09-23 14:45
贵州大学 财务
勇敢求职牛牛:怎么9.2佬人手一个中信证券实习
点赞 评论 收藏
分享
Minamotoek...:你这个简历,看一眼就感觉很乱,而且还写什么羽毛球教练和训练教官之类的,感觉和你要投的岗位很不相干
投递前程无忧等公司10个岗位
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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