1468. Calculate Salaries

https://leetcode.com/problems/calculate-salaries

Description

Table Salaries:

+---------------+---------+
| Column Name   | Type    |
+---------------+---------+
| company\_id    | int     |
| employee\_id   | int     |
| employee\_name | varchar |
| salary        | int     |
+---------------+---------+
(company\_id, employee\_id) is the primary key for this table.
This table contains the company id, the id, the name and the salary for an employee.

Write an SQL query to find the salaries of the employees after applying taxes.

The tax rate is calculated for each company based on the following criteria:

  • 0% If the max salary of any employee in the company is less than 1000$.

  • 24% If the max salary of any employee in the company is in the range [1000, 10000] inclusive.

  • 49% If the max salary of any employee in the company is greater than 10000$.

Return the result table in any order. Round the salary to the nearest integer.

The query result format is in the following example:

ac

Last updated

Was this helpful?