From e834512bba569f1851d33dbf95a2b8fc5d05bdc1 Mon Sep 17 00:00:00 2001 From: MatRouillard Date: Tue, 27 Aug 2024 09:26:29 +0900 Subject: [PATCH] Add aliases to subqueries --- Python/graph_analysis.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Python/graph_analysis.py b/Python/graph_analysis.py index 7477cea..16b11ff 100644 --- a/Python/graph_analysis.py +++ b/Python/graph_analysis.py @@ -425,7 +425,7 @@ def getConnectedComponents(connection:psycopg2.extensions.connection, SELECT COUNT(*) FROM public.pgr_connectedComponents('SELECT id, source, target, cost, reverse_cost FROM {schema}.{edgeTableName}') GROUP BY DISTINCT component - )""" + ) AS sub;""" # Execute query cursor = utils.executeSelectQuery(connection, query) @@ -501,7 +501,7 @@ def getStrongConnectedComponents(connection:psycopg2.extensions.connection, SELECT COUNT(*) FROM public.pgr_strongComponents('SELECT id, source, target, cost, reverse_cost FROM {schema}.{edgeTableName}') GROUP BY DISTINCT component - )""" + ) AS sub;""" # Execute query cursor = utils.executeSelectQuery(connection, query)