pessoal, to tentando deletar registros duplicados e manter apenas o ultimo, criei esse script, mas não funcona. diz q tem erro na sintaxe. Delete from aluno a
Where not exists(select count(*) as tot
from aluno b
where a.id_curso=b.id_curso
and a.sessao=b.sessao
and a.score=b.score
and a.id_vestibulando<>b.id_vestibulando
)