11 lines
331 B
Plaintext
11 lines
331 B
Plaintext
|
|
# Join two predicate-backed tables through the SQL frontend.
|
||
|
|
|
||
|
|
fact Parent(alice, bob).
|
||
|
|
fact Parent(bob, carol).
|
||
|
|
fact Ancestor(bob, carol).
|
||
|
|
fact Ancestor(carol, dave).
|
||
|
|
|
||
|
|
schema Parent(parent, child).
|
||
|
|
schema Ancestor(parent, child).
|
||
|
|
sql SELECT Parent.parent, Ancestor.child FROM Parent, Ancestor WHERE Parent.child = Ancestor.parent;
|