Leetcode596. Classes More Than 5 Students
来源:互联网 发布:0.32双丝并绕数据 编辑:程序博客网 时间:2024/06/08 18:38
There is a table courses with columns: student and class
Please list out all classes which have more than or equal to 5 students.
For example, the table:
+———+————+
| student | class |
+———+————+
| A | Math |
| B | English |
| C | Math |
| D | Biology |
| E | Math |
| F | Computer |
| G | Math |
| H | Math |
| I | Math |
+———+————+
Should output:
+———+
| class |
+———+
| Math |
+———+
Note:
The students should not be counted duplicate in each course.
大概是考察group by的用法
select c.classfrom courses cgroup by c.classhaving count(DISTINCT c.student)>4
阅读全文
0 0
- Leetcode596. Classes More Than 5 Students
- Classes More Than 5 Students
- 596. Classes More Than 5 Students
- [leetcode]596. Classes More Than 5 Students
- 596. Classes More Than 5 Students
- 【LeetCode】596、Classes More Than 5 Students
- 596. Classes More Than 5 Students
- case classes cannot have more than 22 parameters
- scala2.10.x case classes cannot have more than 22 parameters
- more than and less than
- no more than VS not more than
- “! LaTeX source files more than 5 years old!.”解决方案(转)
- Women talk more than men
- More than one order matters
- {Less} is more, than Css
- More Than A Feeling-Boston
- SVN提交改动时报错You must input more than 5 chars as comment!
- Tobacco do more harm than good
- servlet
- 629. K Inverse Pairs Array
- 快学scala之数组操作
- 远程连接ubuntu mysql出现2003错误 cant connect to mysql
- Fastjson toJSONString用单引号进行转换
- Leetcode596. Classes More Than 5 Students
- angularjs input 表单校验指令整理
- 使用@ResponseBody的中文乱码问题
- Dom 倒计时按钮
- Leetcode197. Rising Temperature
- webpack安装与基本配置
- NKOJ-1887 借教室 【NOIP2012 day2】
- WeiXinUtil
- .NET中的反射(2)