当前位置:网站首页>Database SQL practice 4. Find the last of employees in all assigned departments_ Name and first_ name
Database SQL practice 4. Find the last of employees in all assigned departments_ Name and first_ name
2022-07-05 07:12:00 【Just as young】
Title Description
Find all the employees in the assigned department last_name and first_name as well as dept_no( Notice the order of the columns in the output description )
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`));
CREATE TABLE `employees` (
`emp_no` int(11) NOT NULL,
`birth_date` date NOT NULL,
`first_name` varchar(14) NOT NULL,
`last_name` varchar(16) NOT NULL,
`gender` char(1) NOT NULL,
`hire_date` date NOT NULL,
PRIMARY KEY (`emp_no`));
Input description :
nothing
Output description :
last_name | first_name | dept_no |
---|---|---|
Facello | Georgi | d001 |
Omit | Omit | Omit |
Piveteau | Duangkaew | d006 |
Implementation code
select e.last_name, e.first_name, d.dept_no
from employees as e
inner join dept_emp as d
on e.emp_no = d.emp_no
边栏推荐
- npm install -g/--save/--save-dev的区别
- The differences and connections among cookies, sessions, JWT, and tokens
- Architecture
- 摄像头的MIPI接口、DVP接口和CSI接口
- ROS2——工作空间(五)
- Three body goal management notes
- [tf1] save and load parameters
- GPIO port bit based on Cortex-M3 and M4 with operation macro definition (can be used for bus input and output, STM32, aducm4050, etc.)
- Volcano resource reservation feature
- Interpretation of the earliest sketches - image translation work sketchygan
猜你喜欢
Orin 安装CUDA环境
Intelligent target detection 59 -- detailed explanation of pytoch focal loss and its implementation in yolov4
Solve tensorfow GPU modulenotfounderror: no module named 'tensorflow_ core. estimator‘
SRE核心体系了解
Concurrent programming - deadlock troubleshooting and handling
ROS2——topic话题(八)
M2dgr slam data set of multi-source and multi scene ground robot
window navicat连接阿里云服务器mysql步骤及常见问题
【Node】nvm 版本管理工具
ROS2——初识ROS2(一)
随机推荐
Negative number storage and type conversion in programs
基于FPGA的一维卷积神经网络CNN的实现(八)激活层实现
[untitled]
【obs】x264编码:“buffer_size“
[software testing] 05 -- principles of software testing
Ros2 - first acquaintance with ros2 (I)
PHY drive commissioning --- mdio/mdc interface Clause 22 and 45 (I)
SD_ CMD_ SEND_ SHIFT_ REGISTER
Orin 安装CUDA环境
SD_CMD_RECEIVE_SHIFT_REGISTER
1290_FreeRTOS中prvTaskIsTaskSuspended()接口实现分析
Qt项目中的日志库log4qt使用
ROS2——功能包(六)
Build a microservice cluster environment locally and learn to deploy automatically
Lexin interview process
PHY驱动调试之 --- PHY控制器驱动(二)
iNFTnews | 喝茶送虚拟股票?浅析奈雪的茶“发币”
An article was opened to test the real situation of outsourcing companies
Now there are HTML files and MVC made with vs (connected to the database). How can they be connected?
并发编程 — 死锁排查及处理