logo

Back to questions

Unfinished Parts

Easy

Tesla is investigating bottlenecks in their production, and they need your help to extract the relevant data. Write a SQL query that determines which parts have begun the assembly process but are not yet finished.

Assumption

  • Table contains all parts in production.

Table:

Column NameType
partstring
finish_datedatetime
assembly_stepinteger

Example Input:

partfinish_dateassembly_step
battery01/22/2022 00:00:001
battery02/22/2022 00:00:002
battery03/22/2022 00:00:003
bumper01/22/2022 00:00:001
bumper02/22/2022 00:00:002
bumper3
bumper4

Example Output:

part
bumper

Explanation: The only item in the output is "bumper" because step 3 didn't have a finish date.

PostgreSQL 14

Refer friends to get bonus content & cool prizes.