ALTER TABLE uygulama.uygulama_single
ADD COLUMN cift character varying(25);
select idd from uygulama.uygulama_single
where idd not in
(
select max(idd)
from uygulama.uygulama_single
group by objectid)
;
update uygulama.uygulama_single
set cift = 1
where idd not in
(
select max(idd)
from uygulama.uygulama_single
group by objectid)
;
delete from uygulama.uygulama_single
where cift = '1'
;