Pergunta de entrevista da empresa Oracle

Write a simple SQL statement to find people with the same last name but not the same autogenerated ID in the same table.

Respostas da entrevista

Sigiloso

12 de mai. de 2015

You can use a group by last name and auto generated id.. That works best

Sigiloso

7 de fev. de 2019

select a.name, b.name from t as a, t as b where a.surname = b.surname and a.id b.id