/* Retrieve all students whose last name sounds the same - using soundex() */

select * 
from student
where soundex(lname) in (                 
     select soundex(lname)     --select lnames with same sound              
     from student              --from student
     group by soundex(lname)   --group it
     having count(*) > 1       --only interested if 2 or more lname sound the same
)