Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Find Tests With No Recent Execution

MediumSQL · PostgreSQL00:00
Practice interviewer
In session
5 left
00:00

Your question is Find Tests With No Recent Execution. Start with the requirements and the two tables on the right.

Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.

You need to log in / sign up to run or submit.

Problem

Apex Systems QA engineers use the Apex Test Hub to monitor automated and manual test coverage. Write a PostgreSQL query that identifies tests with no execution history during the last 60 calendar days.

Requirements

  1. Return each qualifying test's ID, name, product area, and owner.
  2. Include tests that have never been executed and tests whose executions are all older than 60 days.
  3. Exclude executions dated in the future, and sort the results by test ID.

Schema

tests
ColumnTypeDescription
test_idPKINTEGERUnique test identifier
test_nameVARCHAR(150)Test name
product_areaVARCHAR(80)Product or feature area
owner_nameVARCHAR(100)Assigned test owner
test_executions
ColumnTypeDescription
execution_idPKINTEGERUnique execution identifier
test_idINTEGERReferenced test identifier
executed_atTIMESTAMPTZExecution timestamp
execution_statusVARCHAR(20)Execution result
Tablesteststest_executions
Your solutionPostgreSQL
You need to log in / sign up to run or submit.
Run a query to see results