FastPrepCompanies Above a Salary Threshold

Companies Above a Salary Threshold

Verisk logoVerisk● EasyFULLTIMEOA

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.

TableColumns
companiescompany_id, company_name
salariesemployee_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.

ColumnTypeNullableDescription
company_idPKIntegerNo—
company_nameTextNo—

salaries

One salary row per employee.

ColumnTypeNullableDescription
employee_idPKIntegerNo—
company_idIntegerNo—
salaryIntegerNo—

Expected result

Your query or function must return these columns.

ColumnTypeNullableDescription
company_nameTextNo—

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 problems

See Verisk hiring insights