diff --git a/jena/path2.qry b/jena/path2.qry
new file mode 100644
index 0000000000000000000000000000000000000000..13a3252c6dd5775af20ce21e39a662cd64e38939
--- /dev/null
+++ b/jena/path2.qry
@@ -0,0 +1,2 @@
+prefix : <http://example.org/stuff/1.0/>
+SELECT (count(*) as ?resultcount) WHERE {?a :par / :par ?b}
diff --git a/neo4j/path2.qry b/neo4j/path2.qry
new file mode 100644
index 0000000000000000000000000000000000000000..f9d243365881dc04691d154a65ba1de75d934bd2
--- /dev/null
+++ b/neo4j/path2.qry
@@ -0,0 +1,10 @@
+MATCH (n)
+DETACH DELETE n;
+
+LOAD CSV FROM 'file://INSTANCE' AS line
+MERGE (a:Node {n: toInteger(line[0])})
+MERGE (b:Node {n: toInteger(trim(line[1]))})
+CREATE (a)-[:PAR]->(b);
+
+MATCH (a)-[:PAR]->(t)-[:PAR]->(b)
+RETURN COUNT(DISTINCT [a,b]);
diff --git a/pg/tc.sql.tbl b/pg/tc.sql.tbl
index 12b658531ad1fae1bb6d2e8021074b096ab1ccab..b9e0c6e8a0f30b72e313b4387d6a0e5c7b75deaa 100644
--- a/pg/tc.sql.tbl
+++ b/pg/tc.sql.tbl
@@ -4,9 +4,9 @@ drop table if exists par;
 
 SET work_mem TO '1 GB';
 
-create TEMPORARY table par(x integer not null, y integer not null);
+create TEMPORARY table par(a integer not null, b integer not null);
 
 \echo 'LOAD DATA'
 \copy par from 'INSTANCE';
 
-create index par_y on par(y);
+create index par_b on par(b);
diff --git a/souffle/path2.dl b/souffle/path2.dl
new file mode 100644
index 0000000000000000000000000000000000000000..0b07c6ae0117bcf655564cd535b280e9e3cb7ae0
--- /dev/null
+++ b/souffle/path2.dl
@@ -0,0 +1,15 @@
+
+//
+// par - "parent"/"edge" relation
+//
+.decl par (n:number, m:number)
+.input par(IO=file, filename="INSTANCE")
+// par(1,2).
+// par(2,3).
+
+//.decl path2 (n:number, m:number) output
+.decl path2 (n:number, m:number)
+//.output path2(IO=stdout)
+.printsize path2
+
+path2(X, Y)  :- par(X, Z), par(Z, Y).
diff --git a/sql/path2.sql b/sql/path2.sql
new file mode 100644
index 0000000000000000000000000000000000000000..2af560366f4fd5fd3570d813009b50ecb8c6fbc9
--- /dev/null
+++ b/sql/path2.sql
@@ -0,0 +1,4 @@
+
+WITH path2(a,b) AS (
+	SELECT DISTINCT p1.a, p2.b from par p1 JOIN par p2 ON p1.b = p2.a
+) SELECT Count(*) FROM path2;