当前位置:网站首页>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
边栏推荐
- 2022年中纪实 -- 一个普通人的经历
- [software testing] 02 -- software defect management
- [solved] there is something wrong with the image
- [vscode] search using regular expressions
- [software testing] 04 -- software testing and software development
- [framework] multi learner
- Now there are HTML files and MVC made with vs (connected to the database). How can they be connected?
- PHY drive commissioning --- mdio/mdc interface Clause 22 and 45 (I)
- [software testing] 03 -- overview of software testing
- ImportError: No module named ‘Tkinter‘
猜你喜欢

Log4qt usage of logbase in QT project

Mathematical analysis_ Notes_ Chapter 8: multiple integral

PHY驱动调试之 --- MDIO/MDC接口22号和45号条款(一)

Ros2 - function package (VI)

Volcano 资源预留特性
![[node] NVM version management tool](/img/26/f13a2451c2f177a86bcb2920936468.png)
[node] NVM version management tool

目标检测系列——Faster R-CNN原理详解

并发编程 — 如何中断/停止一个运行中的线程?

你心目中的数据分析 Top 1 选 Pandas 还是选 SQL?

并发编程 — 死锁排查及处理
随机推荐
Mathematical analysis_ Notes_ Chapter 8: multiple integral
Mipi interface, DVP interface and CSI interface of camera
Application of MATLAB in Linear Algebra (4): similar matrix and quadratic form
docker安装mysql并使用navicat连接
SD_CMD_SEND_SHIFT_REGISTER
小米笔试真题一
Ros2 - first acquaintance with ros2 (I)
PostMessage communication
逻辑结构与物理结构
Raspberry pie 4B arm platform aarch64 PIP installation pytorch
ImportError: No module named ‘Tkinter‘
window navicat连接阿里云服务器mysql步骤及常见问题
Negative number storage and type conversion in programs
UIO driven framework
Ros2 - common command line (IV)
并发编程 — 死锁排查及处理
The problem of configuring opencv in qt5.13.2 is solved in detail
[tf] Unknown: Failed to get convolution algorithm. This is probably because cuDNN failed to initial
ROS2——topic话题(八)
U-Boot初始化及工作流程分析