Quale è il campo che deve essere presente in tab3?
Mettilo sia nel join che nel where