1.查询公司员工工资的最大值,最小值,平均值,总和

    1. select max(salary) 最大值,min(salary)最小值,avg(salary) 平均值,sum(salary)和 from employees;

    2.查询员工表中的最大入职时间和最小入职时间的相差天数 (DIFFRENCE)

    select max(hiredate) 最大,min(hiredate)最小,(max(hiredate)-min(hiredate))/1000/24/3600 DIFFRENCE from employees;
    select DATEDIFF(max(hiredate),min(hiredate)) from employees;
    SELECT DATEDIFF('1995-2-7','1995-2-6');
    

    3.查询部门编号为90的员工个数

    select count(*) from employees where department_id=90