-- Select zum nachstellen
select country
, year
, area_used_for_bio_cropland
, area_used_for_forest
from gdb_world_agriculture_area
where country in
( select country
from gdb_world_agriculture_area
where area_used_for_forest is null
intersect
select country
from gdb_world_agriculture_area
where area_used_for_forest is not null
) order by 1, 2
;
-- Bugfix
update gdb_world_agriculture_area
set area_used_for_forest = area_used_for_bio_cropland
, area_used_for_bio_cropland = null
where country in
( select country
from gdb_world_agriculture_area
where area_used_for_forest is null
intersect
select country
from gdb_world_agriculture_area
where area_used_for_forest is not null
)
and area_used_for_forest is null
;