metti in join (left/right) le tabelle e fai delete dei record null