2004. The Number of Seniors and Juniors to Join the Company
https://leetcode.com/problems/the-number-of-seniors-and-juniors-to-join-the-company
Description
Table: Candidates
+-------------+------+
| Column Name | Type |
+-------------+------+
| employee\_id | int |
| experience | enum |
| salary | int |
+-------------+------+
employee\_id is the primary key column for this table.
experience is an enum with one of the values ('Senior', 'Junior').
Each row of this table indicates the id of a candidate, their monthly salary, and their experience.A company wants to hire new employees. The budget of the company for the salaries is $70000. The company's criteria for hiring are:
Hiring the largest number of seniors.
After hiring the maximum number of seniors, use the remaining budget to hire the largest number of juniors.
Write an SQL query to find the number of seniors and juniors hired under the mentioned criteria.
Return the result table in any order.
The query result format is in the following example.
Example 1:
Example 2:
ac
Previous2003. Smallest Missing Genetic Value in Each SubtreeNext2005. Subtree Removal Game with Fibonacci Tree
Last updated
Was this helpful?