#Case: Query employee salary levels SELECT salary,grade_level FROM employees JOIN job_grades g ON e.`salary` BETWEEN g.`lowest_sal` AND g.`lowest_sal`; #Example: Query the number of each salary level and sort by level in descending order SELECT COUNT(*),grade_level FROM job_grades j JOIN employees ON e.`salary` BETWEEN j.`lowest_sal` AND j.`highest_sal` GROUP BY grade_level DESC; Content extension : grammar
Case 1: Query employee name, department name SELECT last_name,department_name FROM employees INNER JOIN departments d ON e.department_id=d.department_id; Case 2: Query the employee names and job titles containing "e" (add filter) SELECT last_name,job_title FROM employees INNER JOIN jobs j ON e.job_id=j.job_id WHERE e.last_name LIKE '%e%'; The above is all the knowledge points introduced this time. You may also be interested in:
|
>>: Linux tac command implementation example
Table of contents Overview Virtual Dom principle ...
1. MySQL rpm package installation # Download the ...
There are two main reasons why it is difficult to...
Reference Documentation Official Docker installat...
1. The difference between the command > and &g...
1Several common character sets In MySQL, the most...
1. haslayout and bfc are IE-specific and standard ...
Related articles: Install Docker using yum under ...
Sometimes you need to set several areas on a pict...
Implemented according to the online tutorial. zab...
TABLE> <TR> <TD> <TH> <CA...
Nginx reverse proxy multiple servers, which means...
Install the nvidia graphics card driver under Ubu...
This article example shares the specific code of ...
1. Background In actual projects, we will encount...