SQL QuestSQL Interview Questions › Joins

Sensor Readings of Failed Units

MediumFreeQuerying BasicsJoins

JOIN operational_data with failure_events to show all sensor readings of units that experienced any machine_failure. Show udi, air_temp_k, process_temp_k, rotational_speed_rpm, torque_nm. Order by torque_nm descending. Top 20.

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

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: Operational profile of failures

Hint

JOIN ON udi WHERE machine_failure = 1.

Concepts

SELECT JOIN WHERE

Practise the topic: SQL practice questions · JOIN practice

In these company practice sets

Tesla

A SQL Quest challenge matched to patterns reported for these companies — not a question any of them has published.

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