Learning joins

Finished the WIP subquery thing from yday