AnalystPath

Grant Applicants Who Cleared Review

SQLMediumMid level~15 min

Problem

Table: `applicants`

| Column Name | Type |
|---|---|
| applicant_id | int |
| panel_id | int |
| tenure_years | int |

`applicant_id` is the primary key. `panel_id` is the review panel assigned to the applicant. `tenure_years` is how many years the applicant has worked in the field.

Table: `reviews`

| Column Name | Type |
|---|---|
| panel_id | int |
| points | int |

There is no unique single column. A panel scores several criteria, so a `panel_id` may appear in multiple rows, each row giving the points for one criterion. Return the `applicant_id` of every applicant who has at least `3` years of tenure and whose combined review points across their panel sum to more than `20`. Return the result in any order.

Tables

Example rows — the live problem includes the full dataset.

applicants
applicant_idpanel_idtenure_years
11005
22002
33004
reviews
panel_idpoints
10012
10015
20030

Expected output

Your answer should return 1 row with the columns applicant_id.

Starter code (SQL)

SELECT *
FROM applicants;

Solve this SQL question free

Write SQL and run it instantly in your browser — even on your phone. No signup needed to try.

Solution & explanation

Create a free account to unlock the optimal solution, a step-by-step explanation, and the hidden test cases that grade your answer.

Sign up free to unlock

Related SQL questions