Skip to content

Instantly share code, notes, and snippets.

@cosmic-cortex
Created May 6, 2020 08:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cosmic-cortex/dba7b22ecf700f1427f0fc9a5e627847 to your computer and use it in GitHub Desktop.
Save cosmic-cortex/dba7b22ecf700f1427f0fc9a5e627847 to your computer and use it in GitHub Desktop.
cp_1 = cross_product(left=employees, right=tasks)
s_1 = select(cp_1, [lambda x: x["left.id"] == x["right.employee_id"],
lambda x: x["right.completed"] == False])
cp_2 = cross_product(left=clients, right=s_1)
s_2 = select(cp_2, [lambda x: x["left.contact_id"] == x["right.left.id"]])
result = project(s_2, ["left.name"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment