delete tbl from (select row_number() over(partition by nombre_calle, altura order by fecha desc) as 'ID' from calles) tbl where ID<>1