delete
from
	t_bcm_schemeexecuterec
where
	fid in (
	select
		maxid
	from
		(
		select
			fmodelid,
			fschemeid,
			forgid,
			fyearid,
			fcurrencyid,
			fscenarioid,
			fperiodid,
			count(*) as countnum,
			max(fid) as maxid
		from
			t_bcm_schemeexecuterec
		group by
			fmodelid,
			fschemeid,
			forgid,
			fyearid,
			fcurrencyid,
			fscenarioid,
			fperiodid
		having
			count(*)>1 ) exetable );