Amin An Adjacency

 avatar
unknown
pgsql
a year ago
333 B
8
Indexable
CREATE TABLE "Gnutella"."adjacency_list" AS
SELECT 
    source_node_id, 
    array_agg(destination_node_id) AS destination_node_ids
FROM 
    "Gnutella"."p2p-Gnutella08"
GROUP BY 
    source_node_id
ORDER BY 
    source_node_id;

-- Step 2: Verify the creation and contents of the new table
SELECT * FROM "Gnutella"."adjacency_list";
Editor is loading...
Leave a Comment