#案例:查询员工的工资级别 SELECT salary,grade_level FROM employees e JOIN job_grades g ON e.`sa
#案例:查询员工的工资级别
SELECT
salary,grade_level
FROM
employees e
JOIN
job_grades g
ON
e.`salary` BETWEEN g.`lowest_sal` AND g.`lowest_sal`;
#案例:查询每个工资级别的个数,并且按级别降序
SELECT
COUNT(*),grade_level
FROM
job_grades j
JOIN
employees e
ON
e.`salary` BETWEEN j.`lowest_sal`AND j.`highest_sal`
GROUP BY
grade_level DESC;
--结束END--
本文标题: mysql sql99语法 内连接非等值连接
本文链接: https://lsjlt.com/news/43950.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-10-23
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0