static fetchProductionStep(name, color, department) {
    return db.query(
      'WITH temp AS ( \
        SELECT DepartmentID, MatID, MaterialName \
        FROM departments, productmaterials \
          INNER JOIN products ON productmaterials.ProdID = products.ProductID \
          INNER JOIN materials ON productmaterials.MatID = materials.MaterialID \
        WHERE ProductName LIKE ? AND ProductName LIKE ? AND DepartmentName LIKE ? \
      ) \
      SELECT MaterialName, InStock, Lost \
      FROM temp INNER JOIN amounts ON temp.DepartmentID = amounts.DepID AND temp.MatID = amounts.MatID \
      WHERE Date = (Select DATE(CURRENT_TIMESTAMP() - INTERVAL 8 HOUR))',
      ["%"+name+"%", "%"+color+"%", "%"+department+"%"])
  }
// Returns the type and amount of materials in a given department for a given product.
Returns the type and amount of materials in a given department for a given product.
Returns the type and amount of materials in a given department for a given product .
static fetchProductionStep(name, color, department) {
    return db.query(
      'WITH temp AS ( \
        SELECT DepartmentID, MatID, MaterialName \
        FROM departments, productmaterials \
          INNER JOIN products ON productmaterials.ProdID = products.ProductID \
          INNER JOIN materials ON productmaterials.MatID = materials.MaterialID \
        WHERE ProductName LIKE ? AND ProductName LIKE ? AND DepartmentName LIKE ? \
      ) \
      SELECT MaterialName, InStock, Lost \
      FROM temp INNER JOIN amounts ON temp.DepartmentID = amounts.DepID AND temp.MatID = amounts.MatID \
      WHERE Date = (Select DATE(CURRENT_TIMESTAMP() - INTERVAL 8 HOUR))',
      ["%"+name+"%", "%"+color+"%", "%"+department+"%"])
  }
static fetchProductionStep ( name , color , department ) { return db . query ( 'WITH temp AS ( \
        SELECT DepartmentID, MatID, MaterialName \
        FROM departments, productmaterials \
          INNER JOIN products ON productmaterials.ProdID = products.ProductID \
          INNER JOIN materials ON productmaterials.MatID = materials.MaterialID \
        WHERE ProductName LIKE ? AND ProductName LIKE ? AND DepartmentName LIKE ? \
      ) \
      SELECT MaterialName, InStock, Lost \
      FROM temp INNER JOIN amounts ON temp.DepartmentID = amounts.DepID AND temp.MatID = amounts.MatID \
      WHERE Date = (Select DATE(CURRENT_TIMESTAMP() - INTERVAL 8 HOUR))' , [ "%" + name + "%" , "%" + color + "%" , "%" + department + "%" ] ) }
Returns the type and amount of materials in a given department for a given product.
Returns the type and amount of materials in a given department for a given product .