标签:pad lint 包括 ble padding rom 名称 ext exist
字段 | 说明 |
film_id | 电影id |
title | 电影名称 |
description | 电影描述信息 |
CREATE TABLE IF NOT EXISTS film (film_id smallint(5) NOT NULL DEFAULT ‘0‘,title varchar(255) NOT NULL,description text,PRIMARY KEY (film_id));
字段 | 说明 |
category_id | 电影分类id |
name | 电影分类名称 |
last_update | 电影分类最后更新时间 |
CREATE TABLE category (category_id tinyint(3) NOT NULL ,name varchar(25) NOT NULL, `last_update` timestamp,PRIMARY KEY ( category_id ));
字段 | 说明 |
film_id | 电影id |
category_id | 电影分类id |
last_update | 电影id和分类id对应关系的最后更新时间 |
CREATE TABLE film_category (film_id smallint(5) NOT NULL,category_id tinyint(3) NOT NULL, `last_update` timestamp);
select c.name,count(fcc.film_id)as num
from (select * from film f where f.description like ‘%robot%‘) as f
inner join film_category fc on f.film_id=fc.film_id
inner join (select *,count (fc.film_id)as num from film_category fc group by category_id having num>=5)as fcc on fc.category_id=fcc.category_id
inner join category as c on fcc.category_id = c.category_id
标签:pad lint 包括 ble padding rom 名称 ext exist
原文地址:https://www.cnblogs.com/myd620/p/12493709.html