I am new to PostgreSQL and in recursive queries and have this following problem: I have the following tables
- node(id, colour)
- edge(n1,n2)
I have to write a query with a recursive statement that returns the shortest and longest paths between each pair of nodes. The output should look like this: (id1,id2, shortpath,longpath)