标签:查询 ade 案例 mys 连接 between 语法 count desc
#案例:查询员工的工资级别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;
标签:查询 ade 案例 mys 连接 between 语法 count desc
原文地址:https://blog.51cto.com/14437184/2437910