select name from people p inner join member m on p.pid = m.mid order by p.name select p.name from people p join (select member, min(mdate) as minmdate from member group by member ) m on p.pid = m.mid order by minmdate;