How many materials still need to be assembled and have a depth of 2 between each component and their parent product?
still need to be assembled means the assembly doesn't finish or still going on which refers to EndDate IS NULL; a depth of 2 refers to BOMLevel = 2;
SELECT COUNT(*) FROM BillOfMaterials WHERE BOMLevel = 2 AND EndDate IS NULL