merge inner and outer join