当前位置:网站首页>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 |
边栏推荐
- How to modify data file path in DM database
- Learn BeanShell before you dare to say you know JMeter
- Major domestic quantitative trading platforms
- Message mechanism -- message processing
- Mapping location after kotlin confusion
- 数学问题(数论)试除法做质数的判断、分解质因数,筛质数
- Pytoch yolov5 runs bug solution from 0:
- 关于Steam 教育的知识整理
- oracle 存储过程与job任务设置
- Mysql表insert中文变?号的问题解决办法
猜你喜欢

Exposure X8 Standard Version picture post filter PS, LR and other software plug-ins

正大美欧4的主账户关注什么数据?

C language practice - number guessing game

VMware installation win10 reports an error: operating system not found

Thinkphp內核工單系統源碼商業開源版 多用戶+多客服+短信+郵件通知

记录一次Unity 2020.3.31f1的bug

Record the bug of unity 2020.3.31f1 once

How do I interview for a successful software testing position? If you want to get a high salary, you must see the offer

TypeScript函数详解

CY7C68013A之keil编译代码
随机推荐
There is no prompt for SQL in idea XML, and the dialect setting is useless.
解决:代理抛出异常错误
oracle 存储过程与job任务设置
二叉树解题(一)
Summary of main account information of zhengdaliu 4
CY7C68013A之keil编译代码
记录一次Unity 2020.3.31f1的bug
Summary of common string processing functions in C language
Geotrust OV Multi - Domain Domain SSL Certificate rmb2100 per year contains several Domain names?
二叉樹解題(二)
June book news | 9 new books are listed, with a strong lineup and eyes closed!
Mysql中常见的锁
DMA Porter
Design and implementation of general interface open platform - (44) log processing of API services
[C language] Dynamic Planning --- from entry to standing up
Markdown编辑语法
Common locks in MySQL
[understand one article] FD_ Use of set
Read "the way to clean code" - function names should express their behavior
培养中小学生对教育机器人的热爱之心