当前位置:网站首页>True question of MySQL interview (29) -- case - finding favorite movies
True question of MySQL interview (29) -- case - finding favorite movies
2022-06-23 05:41:00 【Socialphobia_ FOGO】
Find your favorite movies
A movie platform ( It's like Douban 、 The cat's eye film ) use 3 A table to record movie information .
“ Movie list ” In is the movie number 、 The movie name 、 Movie description information .
“ Category table ” It's movie classification information , Categories include : Crime movies 、 love film 、 Science fiction film .
“ Movie category table ” It's the corresponding movie ( The movie number in the movie table ) What kind of ( Movie category number in the category table )
lookup “ Movie list ” The movie description information contains “ robot ” In the movie , Find out the corresponding movie category name and the number of movies , It is also required that the film category name corresponds to the number of films >=5 Ministry .
SELECT
Movie category name ,
COUNT(*) AS Number of films
FROM
Movie list
LEFT JOIN Movie category table USING ( Movie number )
LEFT JOIN Category table USING ( Movie category number )
WHERE Movie description information LIKE '% robot %'
GROUP BY Movie category name
HAVING Movie category name IN
(SELECT
Movie category name
FROM
Movie category table
JOIN Category table USING ( Movie category number )
GROUP BY Movie category name
HAVING COUNT(*) >= 5)
give the result as follows :
边栏推荐
- 华为软硬件生态圈成型,从根子上改变美国对软硬件体系的领导地位
- 面对新的挑战,成为更好的自己--进击的技术er
- Real MySQL interview question (XXVIII) -- case - Analysis of indicators of communication operators
- Composite API
- Wechat applet: future wife query generator
- Implementation of pyGame music related functions
- MySQL面试真题(二十六)——滴滴2020年笔试题
- What is the reason for the black screen of the computer monitor when the computer is turned on? What should I do about the black screen of the computer monitor
- Lottery DDD code
- Leetcode 797: all possible paths
猜你喜欢

数据库连接异常:create connection error, url: jdbc:mysql://ip/数据库名, errorCode 0, state 08S01问题处理

read 文件一个字节实际会发生多大的磁盘IO?

制造业数字化转型存在问题及原因分析

Face recognition determination threshold

Go language - custom error

Special research on Intelligent upgrading of heavy trucks in China in 2022

云原生大趋势下的容器化技术现状与发展

Introduction to JDBC (III) implementation of transaction rollback function

Software project management 8.4 Software project quality plan

阿里云对象存储oss+picgo+typora实现构建图床
随机推荐
AI艺术的基因工程?使用 #Artbreeder 改变图像的任意形态
Go language - custom error
Export PDF with watermark
Win11应用商店一直转圈解决办法
Heimdall Database Proxy横向扩展提高20倍
C prime plus notes d'apprentissage - 2, constantes et formatage io (I / o)
数据库连接异常:create connection error, url: jdbc:mysql://ip/数据库名, errorCode 0, state 08S01问题处理
Win11不能录制音频怎么办?Win11无法录入声音的解决方法
啊哈C语言 第7章 有了它你能做更多的事(第27-28讲)
@jsonfield annotation in fastjson
opencv显示图像
Yingjixin ip5566 with type-C port 3A charging and discharging fast charging mobile power supply 5W wireless charging in one SOC
Yingjixin ip6806 wireless charging scheme 5W Qi certified peripheral simplified 14 devices
STM32 clock tree misconfiguration causes boot to enter hard interrupt
高等数学(第七版)同济大学 习题1-8 个人解答
基于SSM框架的借阅图书管理系统
Jsonfield annotation in fastjson
IP6809三线圈15W无线充电发射端方案ic英集芯
Qimen dunjia assistant decision software
英集芯推出4串锂电池100W移动电源升降压方案SoC芯片IP5389