Automatic creation of join queries.