SQL QuestSQL Interview Questions › Joins

Full Failure Profile

MediumFreeQuerying BasicsJoins

For each unit that failed (machine_failure=1), show udi, product_id, type, tool_wear_min, air_temp_k, process_temp_k, rotational_speed_rpm, torque_nm. Triple JOIN: products → operational_data → failure_events. Order by udi.

Solve it in the browser editor →

Runs on SQLite in your browser, graded against the expected result, no signup. A wrong answer gets a diagnosis, not just "incorrect".

Schema

products

udiproduct_idtypetool_wear_min
5640L52819L180
2171M17030M10
228L47407L168

operational_data

udiair_temp_kprocess_temp_krotational_speed_rpmtorque_nm
5640302.6312.1166828.7
2171299.4309.1150043.3
228298.3308.5153936.1

failure_events

udimachine_failuretwfhdfpwfosfrnf
5640000001
2171000000
228000000

Expected output: Complete forensic view per failure

Hint

Three-table JOIN on udi. WHERE machine_failure = 1.

Concepts

SELECT JOIN WHERE Multi-JOIN

Practise the topic: SQL practice questions · JOIN practice

Related questions

Customers Who Never OrderedMedium · FreeAbove-Average Departments (Derived Table)Medium · FreeLEFT JOIN NULL Semantics: Inactive CustomersMedium · FreeManagement Hierarchy OverviewMedium · FreeCount Direct ReportsMedium · FreeCustomer Recency AnalysisMedium · Free

Where would this cost you points in an interview?

Ten questions, no signup: a Skillmap across nine SQL skills and the one to fix first.

Take the readiness test