当前位置:网站首页>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 |
边栏推荐
- idea自動導包和自動删包設置
- Mouse events in JS
- Common errors of dmrman offline backup
- 洛谷入门3【循环结构】题单题解
- Learn BeanShell before you dare to say you know JMeter
- LeetCode-归并排序链表
- Summary of main account information of zhengdaliu 4
- The core idea of performance optimization, dry goods sharing
- List of common bugs in software testing
- 6月书讯 | 9本新书上市,阵容强大,闭眼入!
猜你喜欢
Several methods of capturing packets under CS framework
Ognl和EL表达式以及内存马的安全研究
Thinkphp Kernel wo system source Commercial Open source multi - user + multi - Customer Service + SMS + email notification
Landing guide for "prohibit using select * as query field list"
Why can't you remember when reading? Why can't you remember- My technology learning methodology
Embedded-c language-8-character pointer array / large program implementation
[C language] Dynamic Planning --- from entry to standing up
Idea automatic package import and automatic package deletion settings
Precipitate yourself and stay up late to sort out 100 knowledge points of interface testing professional literacy
Learn BeanShell before you dare to say you know JMeter
随机推荐
Interview question: do you know the difference between deep copy and shallow copy? What is a reference copy?
数学知识——快速幂的理解及例题
Idea automatic package import and automatic package deletion settings
Let正版短信测压开源源码
Starting from the classification of database, I understand the map database
二叉树解题(一)
正大留4的主账户信息汇总
[improvement class] st table to solve the interval maximum value problem [2]
Steam教育的实际问题解决能力
Oracle stored procedure and job task setting
Thinkphp内核工单系统源码商业开源版 多用户+多客服+短信+邮件通知
记录一次Unity 2020.3.31f1的bug
Deeply understand the concepts of synchronization and asynchrony, blocking and non blocking, parallel and serial
[C language] Dynamic Planning --- from entry to standing up
unable to execute xxx. SH: operation not permitted
Getting started with pytest -- description of fixture parameters
Cache consistency solution - how to ensure the consistency between the cache and the data in the database when changing data
Federal learning: dividing non IID samples according to Dirichlet distribution
Websites that it people often visit
DC-1靶场搭建及渗透实战详细过程(DC靶场系列)