SELECT * FROM AllPairsShortestPath ( ON callers AS vertices PARTITION BY callerid ON calls AS edges PARTITION BY callerfrom TargetKey ('callerto') MaxDistance ('-1') ) ORDER BY source, target;
SELECT * FROM AllPairsShortestPath ( ON callers AS vertices PARTITION BY callerid ON calls AS edges PARTITION BY callerfrom TargetKey ('callerto') MaxDistance ('-1') ) ORDER BY source, target;