static fetchInProduction(){
    return db.query( // ReadyShip departmentID's are 34-37 and Sold is 38.
      'WITH temp AS ( \
        SELECT ProdID, amounts.MatID, DepID, InStock, Lost, MaterialAmount \
        FROM productmaterials INNER JOIN amounts ON productmaterials.MatID = amounts.MatID \
        WHERE DepID NOT IN (34, 35, 36, 37, 38) AND Date = (SELECT DATE(CURRENT_TIMESTAMP() - INTERVAL 8 HOUR)) \
      ) \
      SELECT Location, DepartmentName, ProductName, CAST(MIN(InStock/MaterialAmount) AS INT) AS InDepartment, \
        MAX(Lost) AS Lost \
      FROM temp INNER JOIN products ON temp.ProdID = products.productID \
        INNER JOIN departments ON DepartmentID = DepID \
      WHERE Discontinued = 0 \
      GROUP BY ProductName, DepartmentID \
      ORDER BY Location, DepartmentName, ProductName'
    )
  }
// each product and returns the minimum number among the materials needed for a product.
each product and returns the minimum number among the materials needed for a product.
each product and returns the minimum number among the materials needed for a product .
static fetchInProduction(){
    return db.query( 
      'WITH temp AS ( \
        SELECT ProdID, amounts.MatID, DepID, InStock, Lost, MaterialAmount \
        FROM productmaterials INNER JOIN amounts ON productmaterials.MatID = amounts.MatID \
        WHERE DepID NOT IN (34, 35, 36, 37, 38) AND Date = (SELECT DATE(CURRENT_TIMESTAMP() - INTERVAL 8 HOUR)) \
      ) \
      SELECT Location, DepartmentName, ProductName, CAST(MIN(InStock/MaterialAmount) AS INT) AS InDepartment, \
        MAX(Lost) AS Lost \
      FROM temp INNER JOIN products ON temp.ProdID = products.productID \
        INNER JOIN departments ON DepartmentID = DepID \
      WHERE Discontinued = 0 \
      GROUP BY ProductName, DepartmentID \
      ORDER BY Location, DepartmentName, ProductName'
    )
  }
static fetchInProduction ( ) { return db . query ( 'WITH temp AS ( \
        SELECT ProdID, amounts.MatID, DepID, InStock, Lost, MaterialAmount \
        FROM productmaterials INNER JOIN amounts ON productmaterials.MatID = amounts.MatID \
        WHERE DepID NOT IN (34, 35, 36, 37, 38) AND Date = (SELECT DATE(CURRENT_TIMESTAMP() - INTERVAL 8 HOUR)) \
      ) \
      SELECT Location, DepartmentName, ProductName, CAST(MIN(InStock/MaterialAmount) AS INT) AS InDepartment, \
        MAX(Lost) AS Lost \
      FROM temp INNER JOIN products ON temp.ProdID = products.productID \
        INNER JOIN departments ON DepartmentID = DepID \
      WHERE Discontinued = 0 \
      GROUP BY ProductName, DepartmentID \
      ORDER BY Location, DepartmentName, ProductName' ) }
each product and returns the minimum number among the materials needed for a product.
each product and returns the minimum number among the materials needed for a product .
// ReadyShip departmentID's are 34-37 and Sold is 38.