Consider the following table definition and data:
CREATE TABLE Product_Life (Product_ID INTEGER, Product_class VARCHAR(30), HOURS FLOAT); INSERT INTO Product_Life VALUES (100, 'Bulbs', 100); INSERT INTO Product_Life VALUES (100, 'Bulbs', 200); INSERT INTO Product_Life VALUES (100, 'Bulbs', 300);
The following query uses the Java method that represents intermediate aggregate results as an object:
SELECT Product_ID, SUM(Hours), STD_DEV_OBJ(Hours) FROM Product_Life WHERE Product_Class = 'Bulbs' GROUP BY Product_ID;
The following query uses the Java method that represents intermediate aggregate results as a byte array:
SELECT Product_ID, SUM(Hours), STD_DEV_BYTE(Hours) FROM Product_Life WHERE Product_Class = 'Bulbs' GROUP BY Product_ID;