text: -- This SQL code was generated by sklearn2sql (development version).
  -- Copyright 2018
  
  -- Model : CaretRegressor_cforest
  -- Dataset : freidman1
  -- Database : teradata
  
  
  -- This SQL code can contain one or more statements, to be executed in the order they appear in this file.
  
  
  
  -- Model deployment code
  
  WITH "DT_node_lookup" AS 
  (SELECT "ADS"."KEY" AS "KEY", CASE WHEN ("ADS"."Feature_1" <= CAST(0.691783360732232 AS DOUBLE PRECISION)) THEN CASE WHEN ("ADS"."Feature_3" <= CAST(0.191256153968574 AS DOUBLE PRECISION)) THEN 3 ELSE CASE WHEN ("ADS"."Feature_1" <= CAST(0.265807754297788 AS DOUBLE PRECISION)) THEN 5 ELSE CASE WHEN ("ADS"."Feature_0" <= CAST(0.487765431765612 AS DOUBLE PRECISION)) THEN 7 ELSE 8 END END END ELSE CASE WHEN ("ADS"."Feature_3" <= CAST(0.475194154583085 AS DOUBLE PRECISION)) THEN 10 ELSE 11 END END AS node_id_2 
  FROM freidman1 AS "ADS"), 
  dummy_cte AS 
  (SELECT CAST(0.0 AS DOUBLE PRECISION) AS "X"), 
  "DT_node_data" AS 
  (SELECT "Values".nid AS nid, "Values"."E" AS "E" 
  FROM (SELECT 3 AS nid, CAST(9.04694485691309 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte UNION ALL SELECT 5 AS nid, CAST(11.959643010743802 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte UNION ALL SELECT 7 AS nid, CAST(13.212803727871302 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte UNION ALL SELECT 8 AS nid, CAST(18.9105205105355 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte UNION ALL SELECT 10 AS nid, CAST(17.7626565480407 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte UNION ALL SELECT 11 AS nid, CAST(20.737678405834394 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte) AS "Values"), 
  "DT_Output" AS 
  (SELECT "DT_node_lookup"."KEY" AS "KEY", "DT_node_lookup".node_id_2 AS node_id_2, "DT_node_data".nid AS nid, "DT_node_data"."E" AS "E" 
  FROM "DT_node_lookup" LEFT OUTER JOIN "DT_node_data" ON "DT_node_lookup".node_id_2 = "DT_node_data".nid), 
  "RF_Model_0" AS 
  (SELECT "DT_Output"."KEY" AS "KEY", "DT_Output"."E" AS "Estimator" 
  FROM "DT_Output"), 
  "DT_node_lookup_1" AS 
  (SELECT "ADS"."KEY" AS "KEY", CASE WHEN ("ADS"."Feature_3" <= CAST(0.464078334156305 AS DOUBLE PRECISION)) THEN CASE WHEN ("ADS"."Feature_1" <= CAST(0.367128839412613 AS DOUBLE PRECISION)) THEN 3 ELSE 4 END ELSE CASE WHEN ("ADS"."Feature_1" <= CAST(0.28037750547337 AS DOUBLE PRECISION)) THEN 6 ELSE CASE WHEN ("ADS"."Feature_7" <= CAST(0.501103000341597 AS DOUBLE PRECISION)) THEN CASE WHEN ("ADS"."Feature_3" <= CAST(0.753526971744502 AS DOUBLE PRECISION)) THEN 9 ELSE 10 END ELSE 11 END END END AS node_id_2 
  FROM freidman1 AS "ADS"), 
  dummy_cte_1 AS 
  (SELECT CAST(0.0 AS DOUBLE PRECISION) AS "X"), 
  "DT_node_data_1" AS 
  (SELECT "Values".nid AS nid, "Values"."E" AS "E" 
  FROM (SELECT 3 AS nid, CAST(8.85722082334346 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_1 UNION ALL SELECT 4 AS nid, CAST(14.524708905198699 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_1 UNION ALL SELECT 6 AS nid, CAST(12.8385506474948 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_1 UNION ALL SELECT 9 AS nid, CAST(17.1120168809778 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_1 UNION ALL SELECT 10 AS nid, CAST(20.7236386677595 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_1 UNION ALL SELECT 11 AS nid, CAST(22.401852577100396 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_1) AS "Values"), 
  "DT_Output_1" AS 
  (SELECT "DT_node_lookup_1"."KEY" AS "KEY", "DT_node_lookup_1".node_id_2 AS node_id_2, "DT_node_data_1".nid AS nid, "DT_node_data_1"."E" AS "E" 
  FROM "DT_node_lookup_1" LEFT OUTER JOIN "DT_node_data_1" ON "DT_node_lookup_1".node_id_2 = "DT_node_data_1".nid), 
  "RF_Model_1" AS 
  (SELECT "DT_Output_1"."KEY" AS "KEY", "DT_Output_1"."E" AS "Estimator" 
  FROM "DT_Output_1"), 
  "DT_node_lookup_2" AS 
  (SELECT "ADS"."KEY" AS "KEY", CASE WHEN ("ADS"."Feature_1" <= CAST(0.367128839412613 AS DOUBLE PRECISION)) THEN CASE WHEN ("ADS"."Feature_3" <= CAST(0.315233120211246 AS DOUBLE PRECISION)) THEN 3 ELSE CASE WHEN ("ADS"."Feature_4" <= CAST(0.572781185141255 AS DOUBLE PRECISION)) THEN 5 ELSE 6 END END ELSE CASE WHEN ("ADS"."Feature_3" <= CAST(0.753526971744502 AS DOUBLE PRECISION)) THEN CASE WHEN ("ADS"."Feature_6" <= CAST(0.575702010655756 AS DOUBLE PRECISION)) THEN 9 ELSE 10 END ELSE 11 END END AS node_id_2 
  FROM freidman1 AS "ADS"), 
  dummy_cte_2 AS 
  (SELECT CAST(0.0 AS DOUBLE PRECISION) AS "X"), 
  "DT_node_data_2" AS 
  (SELECT "Values".nid AS nid, "Values"."E" AS "E" 
  FROM (SELECT 3 AS nid, CAST(6.2355294915854 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_2 UNION ALL SELECT 5 AS nid, CAST(12.440487794353302 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_2 UNION ALL SELECT 6 AS nid, CAST(15.950678103782598 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_2 UNION ALL SELECT 9 AS nid, CAST(16.595411176382502 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_2 UNION ALL SELECT 10 AS nid, CAST(18.584461270007 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_2 UNION ALL SELECT 11 AS nid, CAST(21.9062150272296 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_2) AS "Values"), 
  "DT_Output_2" AS 
  (SELECT "DT_node_lookup_2"."KEY" AS "KEY", "DT_node_lookup_2".node_id_2 AS node_id_2, "DT_node_data_2".nid AS nid, "DT_node_data_2"."E" AS "E" 
  FROM "DT_node_lookup_2" LEFT OUTER JOIN "DT_node_data_2" ON "DT_node_lookup_2".node_id_2 = "DT_node_data_2".nid), 
  "RF_Model_2" AS 
  (SELECT "DT_Output_2"."KEY" AS "KEY", "DT_Output_2"."E" AS "Estimator" 
  FROM "DT_Output_2"), 
  "DT_node_lookup_3" AS 
  (SELECT "ADS"."KEY" AS "KEY", CASE WHEN ("ADS"."Feature_1" <= CAST(0.442479840339248 AS DOUBLE PRECISION)) THEN CASE WHEN ("ADS"."Feature_4" <= CAST(0.521731744871482 AS DOUBLE PRECISION)) THEN CASE WHEN ("ADS"."Feature_3" <= CAST(0.452561081823679 AS DOUBLE PRECISION)) THEN 4 ELSE 5 END ELSE 6 END ELSE CASE WHEN ("ADS"."Feature_3" <= CAST(0.267780373233145 AS DOUBLE PRECISION)) THEN 8 ELSE CASE WHEN ("ADS"."Feature_7" <= CAST(0.58853634958618 AS DOUBLE PRECISION)) THEN 10 ELSE 11 END END END AS node_id_2 
  FROM freidman1 AS "ADS"), 
  dummy_cte_3 AS 
  (SELECT CAST(0.0 AS DOUBLE PRECISION) AS "X"), 
  "DT_node_data_3" AS 
  (SELECT "Values".nid AS nid, "Values"."E" AS "E" 
  FROM (SELECT 4 AS nid, CAST(7.90052446163133 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_3 UNION ALL SELECT 5 AS nid, CAST(12.037199571847 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_3 UNION ALL SELECT 6 AS nid, CAST(14.899902957832198 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_3 UNION ALL SELECT 8 AS nid, CAST(14.465993962008 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_3 UNION ALL SELECT 10 AS nid, CAST(18.3035853173563 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_3 UNION ALL SELECT 11 AS nid, CAST(21.0124389859282 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_3) AS "Values"), 
  "DT_Output_3" AS 
  (SELECT "DT_node_lookup_3"."KEY" AS "KEY", "DT_node_lookup_3".node_id_2 AS node_id_2, "DT_node_data_3".nid AS nid, "DT_node_data_3"."E" AS "E" 
  FROM "DT_node_lookup_3" LEFT OUTER JOIN "DT_node_data_3" ON "DT_node_lookup_3".node_id_2 = "DT_node_data_3".nid), 
  "RF_Model_3" AS 
  (SELECT "DT_Output_3"."KEY" AS "KEY", "DT_Output_3"."E" AS "Estimator" 
  FROM "DT_Output_3"), 
  "DT_node_lookup_4" AS 
  (SELECT "ADS"."KEY" AS "KEY", CASE WHEN ("ADS"."Feature_1" <= CAST(0.442479840339248 AS DOUBLE PRECISION)) THEN CASE WHEN ("ADS"."Feature_3" <= CAST(0.202353585797384 AS DOUBLE PRECISION)) THEN 3 ELSE CASE WHEN ("ADS"."Feature_1" <= CAST(0.226933242392817 AS DOUBLE PRECISION)) THEN CASE WHEN ("ADS"."Feature_4" <= CAST(0.474796529258784 AS DOUBLE PRECISION)) THEN 6 ELSE 7 END ELSE 8 END END ELSE CASE WHEN ("ADS"."Feature_3" <= CAST(0.73052662273818 AS DOUBLE PRECISION)) THEN CASE WHEN ("ADS"."Feature_6" <= CAST(0.3279897179641 AS DOUBLE PRECISION)) THEN 11 ELSE CASE WHEN ("ADS"."Feature_1" <= CAST(0.798121831977326 AS DOUBLE PRECISION)) THEN 13 ELSE 14 END END ELSE 15 END END AS node_id_2 
  FROM freidman1 AS "ADS"), 
  dummy_cte_4 AS 
  (SELECT CAST(0.0 AS DOUBLE PRECISION) AS "X"), 
  "DT_node_data_4" AS 
  (SELECT "Values".nid AS nid, "Values"."E" AS "E" 
  FROM (SELECT 3 AS nid, CAST(7.354772924893219 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_4 UNION ALL SELECT 6 AS nid, CAST(10.10683222754 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_4 UNION ALL SELECT 7 AS nid, CAST(12.0845645144918 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_4 UNION ALL SELECT 8 AS nid, CAST(16.8226024100769 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_4 UNION ALL SELECT 11 AS nid, CAST(16.179654370132802 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_4 UNION ALL SELECT 13 AS nid, CAST(18.180473247286 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_4 UNION ALL SELECT 14 AS nid, CAST(20.1135969176171 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_4 UNION ALL SELECT 15 AS nid, CAST(22.3238641986171 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_4) AS "Values"), 
  "DT_Output_4" AS 
  (SELECT "DT_node_lookup_4"."KEY" AS "KEY", "DT_node_lookup_4".node_id_2 AS node_id_2, "DT_node_data_4".nid AS nid, "DT_node_data_4"."E" AS "E" 
  FROM "DT_node_lookup_4" LEFT OUTER JOIN "DT_node_data_4" ON "DT_node_lookup_4".node_id_2 = "DT_node_data_4".nid), 
  "RF_Model_4" AS 
  (SELECT "DT_Output_4"."KEY" AS "KEY", "DT_Output_4"."E" AS "Estimator" 
  FROM "DT_Output_4"), 
  "DT_node_lookup_5" AS 
  (SELECT "ADS"."KEY" AS "KEY", CASE WHEN ("ADS"."Feature_3" <= CAST(0.502381217463652 AS DOUBLE PRECISION)) THEN CASE WHEN ("ADS"."Feature_1" <= CAST(0.389059569409199 AS DOUBLE PRECISION)) THEN CASE WHEN ("ADS"."Feature_4" <= CAST(0.21246035065514 AS DOUBLE PRECISION)) THEN 4 ELSE 5 END ELSE 6 END ELSE CASE WHEN ("ADS"."Feature_1" <= CAST(0.310534829173777 AS DOUBLE PRECISION)) THEN 8 ELSE CASE WHEN ("ADS"."Feature_0" <= CAST(0.75170170457135 AS DOUBLE PRECISION)) THEN 10 ELSE 11 END END END AS node_id_2 
  FROM freidman1 AS "ADS"), 
  dummy_cte_5 AS 
  (SELECT CAST(0.0 AS DOUBLE PRECISION) AS "X"), 
  "DT_node_data_5" AS 
  (SELECT "Values".nid AS nid, "Values"."E" AS "E" 
  FROM (SELECT 4 AS nid, CAST(6.47927114856055 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_5 UNION ALL SELECT 5 AS nid, CAST(11.2057584681156 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_5 UNION ALL SELECT 6 AS nid, CAST(15.3528785812735 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_5 UNION ALL SELECT 8 AS nid, CAST(13.9305091978454 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_5 UNION ALL SELECT 10 AS nid, CAST(20.2910200661182 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_5 UNION ALL SELECT 11 AS nid, CAST(19.3048298494459 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_5) AS "Values"), 
  "DT_Output_5" AS 
  (SELECT "DT_node_lookup_5"."KEY" AS "KEY", "DT_node_lookup_5".node_id_2 AS node_id_2, "DT_node_data_5".nid AS nid, "DT_node_data_5"."E" AS "E" 
  FROM "DT_node_lookup_5" LEFT OUTER JOIN "DT_node_data_5" ON "DT_node_lookup_5".node_id_2 = "DT_node_data_5".nid), 
  "RF_Model_5" AS 
  (SELECT "DT_Output_5"."KEY" AS "KEY", "DT_Output_5"."E" AS "Estimator" 
  FROM "DT_Output_5"), 
  "DT_node_lookup_6" AS 
  (SELECT "ADS"."KEY" AS "KEY", CASE WHEN ("ADS"."Feature_3" <= CAST(0.490961667850481 AS DOUBLE PRECISION)) THEN CASE WHEN ("ADS"."Feature_4" <= CAST(0.430960817903468 AS DOUBLE PRECISION)) THEN 3 ELSE 4 END ELSE CASE WHEN ("ADS"."Feature_1" <= CAST(0.28037750547337 AS DOUBLE PRECISION)) THEN 6 ELSE CASE WHEN ("ADS"."Feature_0" <= CAST(0.300696351290075 AS DOUBLE PRECISION)) THEN 8 ELSE CASE WHEN ("ADS"."Feature_3" <= CAST(0.748542020165211 AS DOUBLE PRECISION)) THEN 10 ELSE 11 END END END END AS node_id_2 
  FROM freidman1 AS "ADS"), 
  dummy_cte_6 AS 
  (SELECT CAST(0.0 AS DOUBLE PRECISION) AS "X"), 
  "DT_node_data_6" AS 
  (SELECT "Values".nid AS nid, "Values"."E" AS "E" 
  FROM (SELECT 3 AS nid, CAST(8.26342900045795 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_6 UNION ALL SELECT 4 AS nid, CAST(14.7499976083746 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_6 UNION ALL SELECT 6 AS nid, CAST(13.5695970203495 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_6 UNION ALL SELECT 8 AS nid, CAST(15.396749859499302 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_6 UNION ALL SELECT 10 AS nid, CAST(18.033706310181802 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_6 UNION ALL SELECT 11 AS nid, CAST(22.3732814833846 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_6) AS "Values"), 
  "DT_Output_6" AS 
  (SELECT "DT_node_lookup_6"."KEY" AS "KEY", "DT_node_lookup_6".node_id_2 AS node_id_2, "DT_node_data_6".nid AS nid, "DT_node_data_6"."E" AS "E" 
  FROM "DT_node_lookup_6" LEFT OUTER JOIN "DT_node_data_6" ON "DT_node_lookup_6".node_id_2 = "DT_node_data_6".nid), 
  "RF_Model_6" AS 
  (SELECT "DT_Output_6"."KEY" AS "KEY", "DT_Output_6"."E" AS "Estimator" 
  FROM "DT_Output_6"), 
  "DT_node_lookup_7" AS 
  (SELECT "ADS"."KEY" AS "KEY", CASE WHEN ("ADS"."Feature_3" <= CAST(0.759169813734128 AS DOUBLE PRECISION)) THEN CASE WHEN ("ADS"."Feature_1" <= CAST(0.442479840339248 AS DOUBLE PRECISION)) THEN CASE WHEN ("ADS"."Feature_3" <= CAST(0.202353585797384 AS DOUBLE PRECISION)) THEN 4 ELSE CASE WHEN ("ADS"."Feature_1" <= CAST(0.217970946559716 AS DOUBLE PRECISION)) THEN 6 ELSE 7 END END ELSE CASE WHEN ("ADS"."Feature_0" <= CAST(0.427318934332263 AS DOUBLE PRECISION)) THEN 9 ELSE 10 END END ELSE 11 END AS node_id_2 
  FROM freidman1 AS "ADS"), 
  dummy_cte_7 AS 
  (SELECT CAST(0.0 AS DOUBLE PRECISION) AS "X"), 
  "DT_node_data_7" AS 
  (SELECT "Values".nid AS nid, "Values"."E" AS "E" 
  FROM (SELECT 4 AS nid, CAST(7.69888703034821 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_7 UNION ALL SELECT 6 AS nid, CAST(11.0377793955546 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_7 UNION ALL SELECT 7 AS nid, CAST(15.4486176276195 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_7 UNION ALL SELECT 9 AS nid, CAST(14.1558808930173 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_7 UNION ALL SELECT 10 AS nid, CAST(18.674518949811198 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_7 UNION ALL SELECT 11 AS nid, CAST(21.2079197829619 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_7) AS "Values"), 
  "DT_Output_7" AS 
  (SELECT "DT_node_lookup_7"."KEY" AS "KEY", "DT_node_lookup_7".node_id_2 AS node_id_2, "DT_node_data_7".nid AS nid, "DT_node_data_7"."E" AS "E" 
  FROM "DT_node_lookup_7" LEFT OUTER JOIN "DT_node_data_7" ON "DT_node_lookup_7".node_id_2 = "DT_node_data_7".nid), 
  "RF_Model_7" AS 
  (SELECT "DT_Output_7"."KEY" AS "KEY", "DT_Output_7"."E" AS "Estimator" 
  FROM "DT_Output_7"), 
  "DT_node_lookup_8" AS 
  (SELECT "ADS"."KEY" AS "KEY", CASE WHEN ("ADS"."Feature_3" <= CAST(0.545925331347061 AS DOUBLE PRECISION)) THEN CASE WHEN ("ADS"."Feature_1" <= CAST(0.389059569409199 AS DOUBLE PRECISION)) THEN CASE WHEN ("ADS"."Feature_4" <= CAST(0.439422698093104 AS DOUBLE PRECISION)) THEN 4 ELSE 5 END ELSE 6 END ELSE CASE WHEN ("ADS"."Feature_1" <= CAST(0.310434530717576 AS DOUBLE PRECISION)) THEN 8 ELSE CASE WHEN ("ADS"."Feature_0" <= CAST(0.392242037137383 AS DOUBLE PRECISION)) THEN 10 ELSE CASE WHEN ("ADS"."Feature_0" <= CAST(0.697265471202226 AS DOUBLE PRECISION)) THEN 12 ELSE 13 END END END END AS node_id_2 
  FROM freidman1 AS "ADS"), 
  dummy_cte_8 AS 
  (SELECT CAST(0.0 AS DOUBLE PRECISION) AS "X"), 
  "DT_node_data_8" AS 
  (SELECT "Values".nid AS nid, "Values"."E" AS "E" 
  FROM (SELECT 4 AS nid, CAST(9.1720930815495 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_8 UNION ALL SELECT 5 AS nid, CAST(11.792269629686999 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_8 UNION ALL SELECT 6 AS nid, CAST(14.2851413557903 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_8 UNION ALL SELECT 8 AS nid, CAST(15.669225804695301 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_8 UNION ALL SELECT 10 AS nid, CAST(18.0863273427216 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_8 UNION ALL SELECT 12 AS nid, CAST(21.760861605683104 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_8 UNION ALL SELECT 13 AS nid, CAST(19.5392952086594 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_8) AS "Values"), 
  "DT_Output_8" AS 
  (SELECT "DT_node_lookup_8"."KEY" AS "KEY", "DT_node_lookup_8".node_id_2 AS node_id_2, "DT_node_data_8".nid AS nid, "DT_node_data_8"."E" AS "E" 
  FROM "DT_node_lookup_8" LEFT OUTER JOIN "DT_node_data_8" ON "DT_node_lookup_8".node_id_2 = "DT_node_data_8".nid), 
  "RF_Model_8" AS 
  (SELECT "DT_Output_8"."KEY" AS "KEY", "DT_Output_8"."E" AS "Estimator" 
  FROM "DT_Output_8"), 
  "DT_node_lookup_9" AS 
  (SELECT "ADS"."KEY" AS "KEY", CASE WHEN ("ADS"."Feature_3" <= CAST(0.378698013308713 AS DOUBLE PRECISION)) THEN CASE WHEN ("ADS"."Feature_6" <= CAST(0.127069258992571 AS DOUBLE PRECISION)) THEN 3 ELSE 4 END ELSE CASE WHEN ("ADS"."Feature_1" <= CAST(0.265807754297788 AS DOUBLE PRECISION)) THEN 6 ELSE CASE WHEN ("ADS"."Feature_0" <= CAST(0.538410230599484 AS DOUBLE PRECISION)) THEN 8 ELSE CASE WHEN ("ADS"."Feature_7" <= CAST(0.711598809723123 AS DOUBLE PRECISION)) THEN 10 ELSE 11 END END END END AS node_id_2 
  FROM freidman1 AS "ADS"), 
  dummy_cte_9 AS 
  (SELECT CAST(0.0 AS DOUBLE PRECISION) AS "X"), 
  "DT_node_data_9" AS 
  (SELECT "Values".nid AS nid, "Values"."E" AS "E" 
  FROM (SELECT 3 AS nid, CAST(14.8468140634609 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_9 UNION ALL SELECT 4 AS nid, CAST(10.051397310410499 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_9 UNION ALL SELECT 6 AS nid, CAST(12.912735258877097 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_9 UNION ALL SELECT 8 AS nid, CAST(16.1730812053548 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_9 UNION ALL SELECT 10 AS nid, CAST(19.0892814748102 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_9 UNION ALL SELECT 11 AS nid, CAST(22.836870573530604 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_9) AS "Values"), 
  "DT_Output_9" AS 
  (SELECT "DT_node_lookup_9"."KEY" AS "KEY", "DT_node_lookup_9".node_id_2 AS node_id_2, "DT_node_data_9".nid AS nid, "DT_node_data_9"."E" AS "E" 
  FROM "DT_node_lookup_9" LEFT OUTER JOIN "DT_node_data_9" ON "DT_node_lookup_9".node_id_2 = "DT_node_data_9".nid), 
  "RF_Model_9" AS 
  (SELECT "DT_Output_9"."KEY" AS "KEY", "DT_Output_9"."E" AS "Estimator" 
  FROM "DT_Output_9"), 
  "RF_0" AS 
  (SELECT "RF_esu_0"."KEY" AS "KEY", "RF_esu_0"."Estimator" AS "Estimator" 
  FROM (SELECT "RF_Model_0"."KEY" AS "KEY", CAST("RF_Model_0"."Estimator" AS DOUBLE PRECISION) AS "Estimator" 
  FROM "RF_Model_0" UNION ALL SELECT "RF_Model_1"."KEY" AS "KEY", CAST("RF_Model_1"."Estimator" AS DOUBLE PRECISION) AS "Estimator" 
  FROM "RF_Model_1" UNION ALL SELECT "RF_Model_2"."KEY" AS "KEY", CAST("RF_Model_2"."Estimator" AS DOUBLE PRECISION) AS "Estimator" 
  FROM "RF_Model_2" UNION ALL SELECT "RF_Model_3"."KEY" AS "KEY", CAST("RF_Model_3"."Estimator" AS DOUBLE PRECISION) AS "Estimator" 
  FROM "RF_Model_3" UNION ALL SELECT "RF_Model_4"."KEY" AS "KEY", CAST("RF_Model_4"."Estimator" AS DOUBLE PRECISION) AS "Estimator" 
  FROM "RF_Model_4" UNION ALL SELECT "RF_Model_5"."KEY" AS "KEY", CAST("RF_Model_5"."Estimator" AS DOUBLE PRECISION) AS "Estimator" 
  FROM "RF_Model_5" UNION ALL SELECT "RF_Model_6"."KEY" AS "KEY", CAST("RF_Model_6"."Estimator" AS DOUBLE PRECISION) AS "Estimator" 
  FROM "RF_Model_6" UNION ALL SELECT "RF_Model_7"."KEY" AS "KEY", CAST("RF_Model_7"."Estimator" AS DOUBLE PRECISION) AS "Estimator" 
  FROM "RF_Model_7" UNION ALL SELECT "RF_Model_8"."KEY" AS "KEY", CAST("RF_Model_8"."Estimator" AS DOUBLE PRECISION) AS "Estimator" 
  FROM "RF_Model_8" UNION ALL SELECT "RF_Model_9"."KEY" AS "KEY", CAST("RF_Model_9"."Estimator" AS DOUBLE PRECISION) AS "Estimator" 
  FROM "RF_Model_9") AS "RF_esu_0"), 
  "DT_node_lookup_10" AS 
  (SELECT "ADS"."KEY" AS "KEY", CASE WHEN ("ADS"."Feature_1" <= CAST(0.208588107113328 AS DOUBLE PRECISION)) THEN CASE WHEN ("ADS"."Feature_4" <= CAST(0.474796529258784 AS DOUBLE PRECISION)) THEN 3 ELSE 4 END ELSE CASE WHEN ("ADS"."Feature_3" <= CAST(0.498951297834257 AS DOUBLE PRECISION)) THEN CASE WHEN ("ADS"."Feature_2" <= CAST(0.228170769714162 AS DOUBLE PRECISION)) THEN 7 ELSE 8 END ELSE CASE WHEN ("ADS"."Feature_0" <= CAST(0.300696351290075 AS DOUBLE PRECISION)) THEN 10 ELSE CASE WHEN ("ADS"."Feature_5" <= CAST(0.705499340080397 AS DOUBLE PRECISION)) THEN 12 ELSE 13 END END END END AS node_id_2 
  FROM freidman1 AS "ADS"), 
  dummy_cte_10 AS 
  (SELECT CAST(0.0 AS DOUBLE PRECISION) AS "X"), 
  "DT_node_data_10" AS 
  (SELECT "Values".nid AS nid, "Values"."E" AS "E" 
  FROM (SELECT 3 AS nid, CAST(10.6998699462485 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_10 UNION ALL SELECT 4 AS nid, CAST(12.3993343688488 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_10 UNION ALL SELECT 7 AS nid, CAST(15.6546599548374 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_10 UNION ALL SELECT 8 AS nid, CAST(9.4786103336762 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_10 UNION ALL SELECT 10 AS nid, CAST(15.443059116376801 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_10 UNION ALL SELECT 12 AS nid, CAST(18.9577939988455 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_10 UNION ALL SELECT 13 AS nid, CAST(22.3126943434852 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_10) AS "Values"), 
  "DT_Output_10" AS 
  (SELECT "DT_node_lookup_10"."KEY" AS "KEY", "DT_node_lookup_10".node_id_2 AS node_id_2, "DT_node_data_10".nid AS nid, "DT_node_data_10"."E" AS "E" 
  FROM "DT_node_lookup_10" LEFT OUTER JOIN "DT_node_data_10" ON "DT_node_lookup_10".node_id_2 = "DT_node_data_10".nid), 
  "RF_Model_10" AS 
  (SELECT "DT_Output_10"."KEY" AS "KEY", "DT_Output_10"."E" AS "Estimator" 
  FROM "DT_Output_10"), 
  "DT_node_lookup_11" AS 
  (SELECT "ADS"."KEY" AS "KEY", CASE WHEN ("ADS"."Feature_1" <= CAST(0.389059569409199 AS DOUBLE PRECISION)) THEN CASE WHEN ("ADS"."Feature_3" <= CAST(0.316651863758783 AS DOUBLE PRECISION)) THEN 3 ELSE CASE WHEN ("ADS"."Feature_1" <= CAST(0.226933242392817 AS DOUBLE PRECISION)) THEN 5 ELSE 6 END END ELSE CASE WHEN ("ADS"."Feature_3" <= CAST(0.753526971744502 AS DOUBLE PRECISION)) THEN CASE WHEN ("ADS"."Feature_4" <= CAST(0.486943837396018 AS DOUBLE PRECISION)) THEN 9 ELSE 10 END ELSE 11 END END AS node_id_2 
  FROM freidman1 AS "ADS"), 
  dummy_cte_11 AS 
  (SELECT CAST(0.0 AS DOUBLE PRECISION) AS "X"), 
  "DT_node_data_11" AS 
  (SELECT "Values".nid AS nid, "Values"."E" AS "E" 
  FROM (SELECT 3 AS nid, CAST(7.343116970037019 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_11 UNION ALL SELECT 5 AS nid, CAST(11.5125465738894 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_11 UNION ALL SELECT 6 AS nid, CAST(15.6853843621629 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_11 UNION ALL SELECT 9 AS nid, CAST(15.8520781167033 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_11 UNION ALL SELECT 10 AS nid, CAST(19.2832001337878 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_11 UNION ALL SELECT 11 AS nid, CAST(21.9060138345243 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_11) AS "Values"), 
  "DT_Output_11" AS 
  (SELECT "DT_node_lookup_11"."KEY" AS "KEY", "DT_node_lookup_11".node_id_2 AS node_id_2, "DT_node_data_11".nid AS nid, "DT_node_data_11"."E" AS "E" 
  FROM "DT_node_lookup_11" LEFT OUTER JOIN "DT_node_data_11" ON "DT_node_lookup_11".node_id_2 = "DT_node_data_11".nid), 
  "RF_Model_11" AS 
  (SELECT "DT_Output_11"."KEY" AS "KEY", "DT_Output_11"."E" AS "Estimator" 
  FROM "DT_Output_11"), 
  "DT_node_lookup_12" AS 
  (SELECT "ADS"."KEY" AS "KEY", CASE WHEN ("ADS"."Feature_1" <= CAST(0.281886507841628 AS DOUBLE PRECISION)) THEN CASE WHEN ("ADS"."Feature_4" <= CAST(0.572781185141255 AS DOUBLE PRECISION)) THEN CASE WHEN ("ADS"."Feature_8" <= CAST(0.483963292580096 AS DOUBLE PRECISION)) THEN 4 ELSE 5 END ELSE 6 END ELSE CASE WHEN ("ADS"."Feature_3" <= CAST(0.753526971744502 AS DOUBLE PRECISION)) THEN CASE WHEN ("ADS"."Feature_0" <= CAST(0.434533728245595 AS DOUBLE PRECISION)) THEN 9 ELSE CASE WHEN ("ADS"."Feature_1" <= CAST(0.713908387456326 AS DOUBLE PRECISION)) THEN 11 ELSE 12 END END ELSE 13 END END AS node_id_2 
  FROM freidman1 AS "ADS"), 
  dummy_cte_12 AS 
  (SELECT CAST(0.0 AS DOUBLE PRECISION) AS "X"), 
  "DT_node_data_12" AS 
  (SELECT "Values".nid AS nid, "Values"."E" AS "E" 
  FROM (SELECT 4 AS nid, CAST(10.7050931711006 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_12 UNION ALL SELECT 5 AS nid, CAST(6.962629168943911 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_12 UNION ALL SELECT 6 AS nid, CAST(14.644139911294198 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_12 UNION ALL SELECT 9 AS nid, CAST(13.2854764948027 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_12 UNION ALL SELECT 11 AS nid, CAST(17.1468133828195 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_12 UNION ALL SELECT 12 AS nid, CAST(20.4623730318152 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_12 UNION ALL SELECT 13 AS nid, CAST(22.016017168519603 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_12) AS "Values"), 
  "DT_Output_12" AS 
  (SELECT "DT_node_lookup_12"."KEY" AS "KEY", "DT_node_lookup_12".node_id_2 AS node_id_2, "DT_node_data_12".nid AS nid, "DT_node_data_12"."E" AS "E" 
  FROM "DT_node_lookup_12" LEFT OUTER JOIN "DT_node_data_12" ON "DT_node_lookup_12".node_id_2 = "DT_node_data_12".nid), 
  "RF_Model_12" AS 
  (SELECT "DT_Output_12"."KEY" AS "KEY", "DT_Output_12"."E" AS "Estimator" 
  FROM "DT_Output_12"), 
  "DT_node_lookup_13" AS 
  (SELECT "ADS"."KEY" AS "KEY", CASE WHEN ("ADS"."Feature_3" <= CAST(0.545925331347061 AS DOUBLE PRECISION)) THEN CASE WHEN ("ADS"."Feature_1" <= CAST(0.556254381154512 AS DOUBLE PRECISION)) THEN CASE WHEN ("ADS"."Feature_4" <= CAST(0.439422698093104 AS DOUBLE PRECISION)) THEN 4 ELSE 5 END ELSE 6 END ELSE CASE WHEN ("ADS"."Feature_1" <= CAST(0.265807754297788 AS DOUBLE PRECISION)) THEN 8 ELSE CASE WHEN ("ADS"."Feature_0" <= CAST(0.300696351290075 AS DOUBLE PRECISION)) THEN 10 ELSE CASE WHEN ("ADS"."Feature_3" <= CAST(0.748542020165211 AS DOUBLE PRECISION)) THEN 12 ELSE 13 END END END END AS node_id_2 
  FROM freidman1 AS "ADS"), 
  dummy_cte_13 AS 
  (SELECT CAST(0.0 AS DOUBLE PRECISION) AS "X"), 
  "DT_node_data_13" AS 
  (SELECT "Values".nid AS nid, "Values"."E" AS "E" 
  FROM (SELECT 4 AS nid, CAST(9.65149742982162 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_13 UNION ALL SELECT 5 AS nid, CAST(13.475391946501801 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_13 UNION ALL SELECT 6 AS nid, CAST(17.5775515111583 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_13 UNION ALL SELECT 8 AS nid, CAST(13.8102448041964 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_13 UNION ALL SELECT 10 AS nid, CAST(15.261738395353301 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_13 UNION ALL SELECT 12 AS nid, CAST(19.1506633308008 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_13 UNION ALL SELECT 13 AS nid, CAST(22.9835333999556 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_13) AS "Values"), 
  "DT_Output_13" AS 
  (SELECT "DT_node_lookup_13"."KEY" AS "KEY", "DT_node_lookup_13".node_id_2 AS node_id_2, "DT_node_data_13".nid AS nid, "DT_node_data_13"."E" AS "E" 
  FROM "DT_node_lookup_13" LEFT OUTER JOIN "DT_node_data_13" ON "DT_node_lookup_13".node_id_2 = "DT_node_data_13".nid), 
  "RF_Model_13" AS 
  (SELECT "DT_Output_13"."KEY" AS "KEY", "DT_Output_13"."E" AS "Estimator" 
  FROM "DT_Output_13"), 
  "DT_node_lookup_14" AS 
  (SELECT "ADS"."KEY" AS "KEY", CASE WHEN ("ADS"."Feature_1" <= CAST(0.389059569409199 AS DOUBLE PRECISION)) THEN CASE WHEN ("ADS"."Feature_3" <= CAST(0.315233120211246 AS DOUBLE PRECISION)) THEN 3 ELSE CASE WHEN ("ADS"."Feature_0" <= CAST(0.487765431765612 AS DOUBLE PRECISION)) THEN 5 ELSE 6 END END ELSE CASE WHEN ("ADS"."Feature_3" <= CAST(0.73052662273818 AS DOUBLE PRECISION)) THEN CASE WHEN ("ADS"."Feature_3" <= CAST(0.324447892560423 AS DOUBLE PRECISION)) THEN 9 ELSE 10 END ELSE 11 END END AS node_id_2 
  FROM freidman1 AS "ADS"), 
  dummy_cte_14 AS 
  (SELECT CAST(0.0 AS DOUBLE PRECISION) AS "X"), 
  "DT_node_data_14" AS 
  (SELECT "Values".nid AS nid, "Values"."E" AS "E" 
  FROM (SELECT 3 AS nid, CAST(7.16989229067841 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_14 UNION ALL SELECT 5 AS nid, CAST(11.435281146208698 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_14 UNION ALL SELECT 6 AS nid, CAST(16.374373934560097 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_14 UNION ALL SELECT 9 AS nid, CAST(15.4996936661014 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_14 UNION ALL SELECT 10 AS nid, CAST(19.1082466422853 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_14 UNION ALL SELECT 11 AS nid, CAST(22.3862906104028 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_14) AS "Values"), 
  "DT_Output_14" AS 
  (SELECT "DT_node_lookup_14"."KEY" AS "KEY", "DT_node_lookup_14".node_id_2 AS node_id_2, "DT_node_data_14".nid AS nid, "DT_node_data_14"."E" AS "E" 
  FROM "DT_node_lookup_14" LEFT OUTER JOIN "DT_node_data_14" ON "DT_node_lookup_14".node_id_2 = "DT_node_data_14".nid), 
  "RF_Model_14" AS 
  (SELECT "DT_Output_14"."KEY" AS "KEY", "DT_Output_14"."E" AS "Estimator" 
  FROM "DT_Output_14"), 
  "DT_node_lookup_15" AS 
  (SELECT "ADS"."KEY" AS "KEY", CASE WHEN ("ADS"."Feature_1" <= CAST(0.367128839412613 AS DOUBLE PRECISION)) THEN CASE WHEN ("ADS"."Feature_3" <= CAST(0.424770976323132 AS DOUBLE PRECISION)) THEN 3 ELSE CASE WHEN ("ADS"."Feature_1" <= CAST(0.104478847716484 AS DOUBLE PRECISION)) THEN 5 ELSE 6 END END ELSE CASE WHEN ("ADS"."Feature_3" <= CAST(0.753526971744502 AS DOUBLE PRECISION)) THEN CASE WHEN ("ADS"."Feature_0" <= CAST(0.434533728245595 AS DOUBLE PRECISION)) THEN 9 ELSE 10 END ELSE 11 END END AS node_id_2 
  FROM freidman1 AS "ADS"), 
  dummy_cte_15 AS 
  (SELECT CAST(0.0 AS DOUBLE PRECISION) AS "X"), 
  "DT_node_data_15" AS 
  (SELECT "Values".nid AS nid, "Values"."E" AS "E" 
  FROM (SELECT 3 AS nid, CAST(8.32291862024137 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_15 UNION ALL SELECT 5 AS nid, CAST(12.2825947004198 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_15 UNION ALL SELECT 6 AS nid, CAST(16.0022630181741 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_15 UNION ALL SELECT 9 AS nid, CAST(14.305624834649501 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_15 UNION ALL SELECT 10 AS nid, CAST(17.976452823669 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_15 UNION ALL SELECT 11 AS nid, CAST(20.0980565984847 AS DOUBLE PRECISION) AS "E" 
  FROM dummy_cte_15) AS "Values"), 
  "DT_Output_15" AS 
  (SELECT "DT_node_lookup_15"."KEY" AS "KEY", "DT_node_lookup_15".node_id_2 AS node_id_2, "DT_node_data_15".nid AS nid, "DT_node_data_15"."E" AS "E" 
  FROM "DT_node_lookup_15" LEFT OUTER JOIN "DT_node_data_15" ON "DT_node_lookup_15".node_id_2 = "DT_node_data_15".nid), 
  "RF_Model_15" AS 
  (SELECT "DT_Output_15"."KEY" AS "KEY", "DT_Output_15"."E" AS "Estimator" 
  FROM "DT_Output_15"), 
  "RF_1" AS 
  (SELECT "RF_esu_1"."KEY" AS "KEY", "RF_esu_1"."Estimator" AS "Estimator" 
  FROM (SELECT "RF_Model_10"."KEY" AS "KEY", CAST("RF_Model_10"."Estimator" AS DOUBLE PRECISION) AS "Estimator" 
  FROM "RF_Model_10" UNION ALL SELECT "RF_Model_11"."KEY" AS "KEY", CAST("RF_Model_11"."Estimator" AS DOUBLE PRECISION) AS "Estimator" 
  FROM "RF_Model_11" UNION ALL SELECT "RF_Model_12"."KEY" AS "KEY", CAST("RF_Model_12"."Estimator" AS DOUBLE PRECISION) AS "Estimator" 
  FROM "RF_Model_12" UNION ALL SELECT "RF_Model_13"."KEY" AS "KEY", CAST("RF_Model_13"."Estimator" AS DOUBLE PRECISION) AS "Estimator" 
  FROM "RF_Model_13" UNION ALL SELECT "RF_Model_14"."KEY" AS "KEY", CAST("RF_Model_14"."Estimator" AS DOUBLE PRECISION) AS "Estimator" 
  FROM "RF_Model_14" UNION ALL SELECT "RF_Model_15"."KEY" AS "KEY", CAST("RF_Model_15"."Estimator" AS DOUBLE PRECISION) AS "Estimator" 
  FROM "RF_Model_15") AS "RF_esu_1"), 
  "RF" AS 
  (SELECT "RFbig_esu"."KEY" AS "KEY", "RFbig_esu"."Estimator" AS "Estimator" 
  FROM (SELECT "RF_0"."KEY" AS "KEY", CAST("RF_0"."Estimator" AS DOUBLE PRECISION) AS "Estimator" 
  FROM "RF_0" UNION ALL SELECT "RF_1"."KEY" AS "KEY", CAST("RF_1"."Estimator" AS DOUBLE PRECISION) AS "Estimator" 
  FROM "RF_1") AS "RFbig_esu"), 
  "RF_avg" AS 
  (SELECT "T"."KEY" AS "KEY", CAST("T"."Estimator" AS DOUBLE PRECISION) AS "Estimator" 
  FROM (SELECT "RF"."KEY" AS "KEY", avg(CAST("RF"."Estimator" AS DOUBLE PRECISION)) AS "Estimator" 
  FROM "RF" GROUP BY "RF"."KEY") AS "T")
   SELECT "RF_avg"."KEY" AS "KEY", "RF_avg"."Estimator" AS "Estimator" 
  FROM "RF_avg"