mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-06 07:51:41 +08:00
存量题库数据更新
This commit is contained in:
@@ -8,20 +8,20 @@
|
||||
| name | varchar |
|
||||
| salary | int |
|
||||
+-------------+---------+
|
||||
employee_id is the primary key for this table.
|
||||
employee_id is the primary key (column with unique values) for this table.
|
||||
Each row of this table indicates the employee ID, employee name, and salary.
|
||||
</pre>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p>Write an SQL query to calculate the bonus of each employee. The bonus of an employee is <code>100%</code> of their salary if the ID of the employee is <strong>an odd number</strong> and <strong>the employee name does not start with the character </strong><code>'M'</code>. The bonus of an employee is <code>0</code> otherwise.</p>
|
||||
<p>Write a solution to calculate the bonus of each employee. The bonus of an employee is <code>100%</code> of their salary if the ID of the employee is <strong>an odd number</strong> and <strong>the employee's name does not start with the character </strong><code>'M'</code>. The bonus of an employee is <code>0</code> otherwise.</p>
|
||||
|
||||
<p>Return the result table ordered by <code>employee_id</code>.</p>
|
||||
|
||||
<p>The query result format is in the following example.</p>
|
||||
<p>The result format is in the following example.</p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Example 1:</strong></p>
|
||||
<p><strong class="example">Example 1:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong>
|
||||
|
Reference in New Issue
Block a user