#187 Queries for Employees and Payments
There are two tables:
Persons containing the list of employees
id | name
----------
1 | Petya
2 | Vasya
3 | Kolya
Payments containing monthly salary accruals
id | person_id | amount
-----------------------
1 | 1 | 10
2 | 1 | 20
3 | 3 | 15
The tables have a one-to-many relationship. An employee may have several payments or no payments at all if they have just joined the company. It is necessary to:
- Select all employees together with their salary accruals.
- Select employees whose total accrual amount exceeds
25.
Question review
Sign in to start the dialogue
The mentor keeps the context of the current question and your previous messages.
Sign in
Available with Premium
This is just one of the solutions available with Premium. And more:
- 250+ advanced lectures
- 1300+ practice exercises
- 500+ solutions to problems from real interviews
- Personalized Java Hub certificates
- Expanded access to the AI mentor