当前位置:网站首页>Mysql重点难题(2)汇总
Mysql重点难题(2)汇总
2022-07-02 04:48:00 【且行且安~】
目录
1、按照dept_no进行汇总
按照dept_no进行汇总,属于同一个部门的emp_no按照逗号进行连接,结果给出dept_no以及连接出的结果employees
CREATE TABLE `dept_emp` (
`emp_no` int(11) NOT NULL,
`dept_no` char(4) NOT NULL,
`from_date` date NOT NULL,
`to_date` date NOT NULL,
PRIMARY KEY (`emp_no`,`dept_no`));
输出格式
| dept_no | employees |
|---|---|
| d001 | 10001,10002 |
| d002 | 10006 |
| d003 | 10005 |
| d004 | 10003,10004 |
| d00 |
边栏推荐
- 正大美欧4的主账户关注什么数据?
- Rhcsa --- work on the third day
- 阿里云polkit pkexec 本地提权漏洞
- Deeply understand the concepts of synchronization and asynchrony, blocking and non blocking, parallel and serial
- Unity particle Foundation
- [improvement class] st table to solve the interval maximum value problem [2]
- Introduction to Luogu 3 [circular structure] problem list solution
- Federal learning: dividing non IID samples according to Dirichlet distribution
- Learn AI safety monitoring project from zero [attach detailed code]
- Cannot activate CONDA virtual environment in vscode
猜你喜欢

数学知识——快速幂的理解及例题

Research on the security of ognl and El expressions and memory horse

数学问题(数论)试除法做质数的判断、分解质因数,筛质数

记录一次Unity 2020.3.31f1的bug

Lm09 Fisher inverse transform inversion mesh strategy

Markdown编辑语法

UNET deployment based on deepstream

unable to execute xxx. SH: operation not permitted

Getting started with pytest -- description of fixture parameters

Three years of experience in Android development interview (I regret that I didn't get n+1, Android bottom development tutorial
随机推荐
数学知识——快速幂的理解及例题
初学爬虫-笔趣阁爬虫
10 minute quick start UI automation ----- puppeter
Use of typescript classes
Hcip day 17
Precipitate yourself and stay up late to sort out 100 knowledge points of interface testing professional literacy
Starting from the classification of database, I understand the map database
记录一次Unity 2020.3.31f1的bug
Federal learning: dividing non IID samples according to Dirichlet distribution
What methods should service define?
ThinkPHP kernel work order system source code commercial open source version multi user + multi customer service + SMS + email notification
Let正版短信测压开源源码
【ClickHouse】How to create index for Map Type Column or one key of it?
Ognl和EL表达式以及内存马的安全研究
Steam教育的实际问题解决能力
C language practice - number guessing game
Design and implementation of general interface open platform - (44) log processing of API services
Its appearance makes competitors tremble. Interpretation of Sony vision-s 02 products
[C language] Dynamic Planning --- from entry to standing up
How do I interview for a successful software testing position? If you want to get a high salary, you must see the offer