当前位置:网站首页>Leetcodesql: count the number of students in each major
Leetcodesql: count the number of students in each major
2022-06-12 18:59:00 【Review of the white speed Dragon King】

Ideas :
Simple left join + groupby + orderby
sql
# Write your MySQL query statement below
select dept_name, count(student_id) student_number
from Department t left join Student s
on s.dept_id = t.dept_id
group by t.dept_name
order by student_number DESC, dept_name ASC
边栏推荐
- leetcode:6094. 公司命名【分组枚举 + 不能重复用set交集 + product笛卡儿积(repeat表示长度)】
- Vue —— 进阶 vue-router 路由(二)(replace属性、编程式路由导航、缓存路由组件、路由的专属钩子)
- In 2021, the global spice and seasoning revenue is about 18720million US dollars, and it is expected to reach 25960million US dollars in 2028
- Experiment 10 Bezier curve generation - experiment improvement - interactive generation of B-spline curve
- uniapp使用阿里图标
- Research Report on the overall scale, major manufacturers, major regions, products and application segmentation of swimming fins in the global market in 2022
- Go init initialization function
- Leetcode 494. 目标和
- 国内如何下载ProxyStrike
- leetcode:6096. Success logarithm of spells and potions [sort + dichotomy]
猜你喜欢

超级重磅!Apache Hudi多模索引对查询优化高达30倍

Go init initialization function

Embedded development: 6 necessary skills for firmware engineers

The Bean Validation API is on the classpath but no implementation could be found

CVPR 2022 oral Dalian Institute of technology proposed SCI: a fast and powerful low light image enhancement method
![[blockbuster release] ant dynamic card, enabling the app home page to realize agile update](/img/65/5ed80090f4d0ee92b01888eb496528.jpg)
[blockbuster release] ant dynamic card, enabling the app home page to realize agile update

Exploration of a flexible injection scheme for istio sidecar

吃饭咯 干锅肥肠 + 掌中宝!

Research Report on the overall scale, major manufacturers, major regions, products and application segments of lifeboats in the global market in 2022

什么是网络代理
随机推荐
软件确认测试知识分享,上海第三方软件测试机构有哪些?
chrome浏览器解决跨域问题
Tarfile decompress nested tar
觀察網站的頁面
kali局域网ARP欺骗(arpspoof)并监听(mitmproxy)局域内其它主机上网记录
RHCA回忆录---CL280介绍
Vue - Advanced Vue router routing (2) (replace attribute, programming route navigation, caching route components, and exclusive hooks for routes)
【图像去噪】基于各向异性滤波实现图像去噪附matlab代码
kali2022如何安装w3af
leetcode:98. 统计得分小于 K 的子数组数目【双指针 + 计算子集个数 + 去重】
Experiment 10 Bezier curve generation - experiment improvement - control point generation of B-spline curve
OpenGL shadow implementation (hard shadow)
leetcode:5289. 公平分发饼干【看数据范围 + dfs剪枝】
232-CH579M学习开发-以太网例程-TCP服务器(项目应用封装,局域网或广域网测试)
超级重磅!Apache Hudi多模索引对查询优化高达30倍
leetcode:6095. 强密码检验器 II【简单模拟 + 不符合直接False】
Observe the page of the website
In 2021, the global revenue of electro-optical modulator (EOM) is about USD 360.3 million, and it is expected to reach USD 704.4 million in 2028
leetcode:6095. Strong password verifier II [simple simulation + direct false]
The Bean Validation API is on the classpath but no implementation could be found