当前位置:网站首页>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
边栏推荐
- OpenGL shadow implementation (hard shadow)
- Go package import mode member visibility
- wireshark基本使用命令
- Order allocation strategy for instant delivery: from modeling and Optimization - Notes
- Leetcode topic [string]-541- reverse string II
- 嵌入式开发:固件工程师的6项必备技能
- 吃饭咯 干锅肥肠 + 掌中宝!
- MySQL数据库(28):变量 variables
- Redis(三十二)-用Redis做分布式锁
- [Huawei cloud stack] [shelf presence] issue 10: difficulties and solutions of it monitoring and diagnosis in the cloud scenario of government enterprise hybrid in the cloud native Era
猜你喜欢

Start with no place to live

Why my order by create_ Time ASC becomes order by ASC
![[0008] unordered list](/img/16/7525d963e68757558dd55ff4d1a23a.png)
[0008] unordered list
![[image denoising] image denoising based on anisotropic filtering with matlab code](/img/3d/ee2e36b15b5db2502e43f6945685c5.png)
[image denoising] image denoising based on anisotropic filtering with matlab code

一种灵活注入 Istio Sidecar 的方案探索

Kali LAN ARP Spoofing and monitoring other hosts' Internet access records in the LAN

Go init initialization function

A journey of database full SQL analysis and audit system performance optimization

leetcode:6095. 强密码检验器 II【简单模拟 + 不符合直接False】

Embedded development: 6 necessary skills for firmware engineers
随机推荐
Go package import mode member visibility
Daily blog - micro service permission 12 matters
用一个性能提升了666倍的小案例说明在TiDB中正确使用索引的重要性
Double non grind one, three side byte, cool. Next time
Report on market demand trends and future strategic planning recommendations of the global and Chinese smart financial solutions industry 2022-2028
Mysql database experiment I data definition
Lua record
leetcode:5259. 计算应缴税款总额【简单模拟 + 看看在哪个区间】
232-ch579m learning and development Ethernet routine TCP server (project application package, LAN or WAN test)
In 2021, the global spice and seasoning revenue is about 18720million US dollars, and it is expected to reach 25960million US dollars in 2028
In 2021, the global fire pump drive power revenue is about $381million, and it is expected to reach $489.3 million in 2028
Mysql database (28): Variables
A small case with 666 times performance improvement illustrates the importance of using indexes correctly in tidb
Chrome browser solves cross domain problems
Leetcode topic [string] - Sword pointing offer 05- replace spaces
Dacom G150双模耳机,为爱发声,呵护孩子听力健康成长
每日一博 - 微服务权限一二事
标准库template学习入门原创
To understand Devops, you must read these ten books!
Dumi builds a document blog