inner and outer join writes