mirror of
				https://gitee.com/coder-xiaomo/leetcode-problemset
				synced 2025-11-04 11:43:12 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			46 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			46 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
<p>表:<code>Employee</code> </p>
 | 
						|
 | 
						|
<pre>
 | 
						|
+-------------+---------+
 | 
						|
| Column Name | Type    |
 | 
						|
+-------------+---------+
 | 
						|
| id          | int     |
 | 
						|
| name        | varchar |
 | 
						|
| salary      | int     |
 | 
						|
| managerId   | int     |
 | 
						|
+-------------+---------+
 | 
						|
id 是该表的主键(具有唯一值的列)。
 | 
						|
该表的每一行都表示雇员的ID、姓名、工资和经理的ID。
 | 
						|
</pre>
 | 
						|
 | 
						|
<p> </p>
 | 
						|
 | 
						|
<p>编写解决方案,找出收入比经理高的员工。</p>
 | 
						|
 | 
						|
<p>以 <strong>任意顺序</strong> 返回结果表。</p>
 | 
						|
 | 
						|
<p>结果格式如下所示。</p>
 | 
						|
 | 
						|
<p> </p>
 | 
						|
 | 
						|
<p><strong>示例 1:</strong></p>
 | 
						|
 | 
						|
<pre>
 | 
						|
<strong>输入:</strong> 
 | 
						|
Employee 表:
 | 
						|
+----+-------+--------+-----------+
 | 
						|
| id | name  | salary | managerId |
 | 
						|
+----+-------+--------+-----------+
 | 
						|
| 1  | Joe   | 70000  | 3         |
 | 
						|
| 2  | Henry | 80000  | 4         |
 | 
						|
| 3  | Sam   | 60000  | Null      |
 | 
						|
| 4  | Max   | 90000  | Null      |
 | 
						|
+----+-------+--------+-----------+
 | 
						|
<strong>输出:</strong> 
 | 
						|
+----------+
 | 
						|
| Employee |
 | 
						|
+----------+
 | 
						|
| Joe      |
 | 
						|
+----------+
 | 
						|
<strong>解释:</strong> Joe 是唯一挣得比经理多的雇员。</pre>
 |