Score
0
Watch 44 Star 256 Fork 69

xuthus / 数据库SQL实战SQLMIT

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
Clone or download
20.查找员工编号emp_no为10001其自入职以来的薪水salary涨幅值growth.md 498 Bytes
Copy Edit Web IDE Raw Blame History
xuthus authored 2019-08-02 22:55 . add:13-21

查找员工编号emp_no为10001其自入职以来的薪水salary涨幅值growth

题目描述

查找员工编号emp_no为10001其自入职以来的薪水salary涨幅值growth

CREATE TABLE `salaries` (
`emp_no` int(11) NOT NULL,
`salary` int(11) NOT NULL,
`from_date` date NOT NULL,
`to_date` date NOT NULL,
PRIMARY KEY (`emp_no`,`from_date`));

答案

select max(salary) - min(salary) growth from salaries where emp_no = 10001

题解

简单的减法操作

Comment ( 0 )

Sign in for post a comment