SQL Manufacturing
SQL Manufacturing
For this project, you're supporting a team that wants to improve the way they're monitoring and controlling a
manufacturing process. The goal is to implement a more methodical approach known as statistical process
control (SPC). SPC is an established strategy that uses data to determine whether the process is working well.
Processes are only adjusted if measurements fall outside of an acceptable range.
This acceptable range is defined by an upper control limit (UCL) and a lower control limit (LCL), the formulas for
which are:
stddev_ height
ucl = avg_height + 3 ∗
√5
stddev_height
lcl = avg_height − 3 ∗
√5
Using SQL window functions, you'll analyze historical manufacturing data to define this acceptable range and
identify any points in the process that fall outside of the range and therefore require adjustments. This will ensure
a smooth running manufacturing process consistently making high-quality products.
The data
The data is available in the manufacturing_parts table which has the following fields:
Out[1]:
item_no length width height operator
Out[2]:
operator row_number height avg_height stddev_height ucl lcl alert
In [2]: -- Production Not out of range (F) vs Production out of range (v) by Operator
In [4]: --Total production out of range by amount of row numbrs