Inner and outer join program