Added actual selection to SQL join result