Companies Above a Salary Threshold
Updated
Problem statement
The companies table stores canonical company names, and salaries stores employee salaries linked by company identifier.
Return the name of every company whose average salary is strictly greater than 40000. Order rows by company_id ascending.
| Table | Columns |
|---|---|
companies | company_id, company_name |
salaries | employee_id, company_id, salary |
Table schema
MySQLPostgreSQLPandas
Use the same input data with any supported language. Open the Schema tab in the editor to see the generated SQL setup or Pandas DataFrames.
companies
One row per company.
| Column | Type | Nullable | Description |
|---|---|---|---|
| company_idPK | Integer | No | — |
| company_name | Text | No | — |
salaries
One salary row per employee.
| Column | Type | Nullable | Description |
|---|---|---|---|
| employee_idPK | Integer | No | — |
| company_id | Integer | No | — |
| salary | Integer | No | — |
Expected result
Your query or function must return these columns.
| Column | Type | Nullable | Description |
|---|---|---|---|
| company_name | Text | No | — |
Row order: must match exactly. Numeric tolerance: 0.
Constraints
- Each table contains between 1 and 100000 rows.
- Identifiers and names are non-null; every salary row references a company.
0 <= salary <= 1000000000.
More Verisk Online Assessment questions
Similar questions at other companies
- Build Taxi Driver Performance FeaturesBoston Consulting Group · OABoston Consulting Group interview questions
- Students Scoring Above AverageCapstone Investment Advisors · OA
- Bond Interest Summary Above 3%Wells Fargo · OAWells Fargo interview questions
- Employee Promotion OpportunitiesIntuit · OAIntuit interview questions
- Students and Their SubjectsBirla Pivot · OA
- Companies with Average Salary Above 40000AT&T · OAAT&T interview questions
- Weekend Appointments for Consular Services ReschedulingMcKinsey & Company · OAMcKinsey & Company interview questions
- Customer Resource Usage AnalysisIBM · OAIBM interview questions
- Customers Who Never OrderedAccenture · OAAccenture interview questions
- First Duplicate Transaction Within Ten MinutesLenskart · OA