added integration test for nested joins