7.00.02 - SQL-MapReduce Call - Aster Analytics

Teradata Aster® Analytics Foundation User GuideUpdate 2

Product
Aster Analytics
Release Number
7.00.02
Release Date
September 2017
Content Type
Programming Reference
User Guide
Publication ID
B700-1022-700K
Language
English (United States)
SELECT player, SUM(partial_avg) / 3 AS shapley_value FROM (
  SELECT player, size, SUM(partial_value) AS partial_avg FROM (	
    SELECT player, (project_comb_cost.value -
                    project_addone_cost.value) / divisor AS
                    partial_value, project_addone_cost.size AS size
                    FROM project_comb_cost INNER JOIN
                    project_addone_cost ON (project_comb_cost.comb =                     project_addone_cost.comb2)
  ) AS stratum GROUP BY player, size
) AS stratum_avg GROUP BY player ORDER BY player;