You need to modify SQL code and you will get the expected answer
Original Query
SELECT distinct d.FamilyCode,first d.FullName,d.Age from datafile d inner join SCHEMETRN2 s2 on d.FamilyCode = s2.FamilyCode
Modified Query
SELECT distinct d.FamilyCode,first d.FullName,d.Age from SCHEMETRN2 s2 inner join datafile d on s2.FamilyCode = d.FamilyCode