SELECT
source,
COUNT(DISTINCT source) as source_count
FROM {G.backend._edge_table_name}
GROUP BY
source
degree (undirected)
SELECT
vert, COUNT(DISTINCT vert) as vert_count
FROM
(
SELECT source as vert FROM {G.backend._edge_table_name}
UNION ALL
SELECT target FROM {G.backend._edge_table_name}
)
GROUP BY vert
Can use something akin to:
out_degree
degree
(undirected)