Input
Input tables are from AllPairsShortestPath Example: Unweighted, Unbounded Graph:
- Vertices: callers
- Edges: calls
SQL Call
SELECT * FROM Closeness ( ON callers AS Vertices PARTITION BY callerid ON calls AS Edges PARTITION BY callerfrom USING TargetKey ('callerto') EdgeWeight ('calls') MaxDistance (8) Accumulate ('callerid', 'callername') ) AS dt ORDER BY callerid;
Output
callerid callername inv_sum_dist inv_avg_dist sum_inv_dist kdegree -------- ---------- ------------------- ------------------- ------------------- ------- 1 john 0.1 0.3 1.0333333333333332 3.0 2 carla 0.14285714285714285 0.14285714285714285 0.14285714285714285 1.0 3 simon 1.0 1.0 1.0 1.0 4 celine 0.25 0.25 0.25 1.0 5 winston NULL NULL NULL 0.0 6 diana NULL NULL NULL 0.0
Download a zip file of all examples and a SQL script file that creates their input tables from the attachment in the left sidebar.