Yolo-929 / DB_Leetcode

不定期更新数据库算法题目,帮助大家巩固数据库知识
1 stars 1 forks source link

5.27 #2

Open Yolo-929 opened 5 years ago

Yolo-929 commented 5 years ago

Solution

第一题

解法

select * from cinema
where id%2!=0 
and Lower(description) NOT LIKE '%boring%'
order by rating desc;
Yolo-929 commented 5 years ago

Solution

第二题

--GROUP BY以及HAVING
SELECT class
FROM courses
GROUP BY class
HAVING count( DISTINCT student ) >= 5;