-- Merge columns 'maxheight' and 'maxheight_'
-- SELECT maxheight, maxheight_ FROM network2clean WHERE maxheight IS NOT NULL AND maxheight_ IS NOT NULL;
UPDATE network2clean set maxheight=maxheight_ WHERE maxheight_ is not null;

-- Merge the speed columns: 'maxspeed', 'maxspeed_b'
-- SELECT maxspeed, maxspeed_b, maxspeed_c, maxspeed_f, maxspeed_r, maxspeed_s from network2clean where maxspeed_b IS NOT NULL OR maxspeed_c IS NOT NULL OR maxspeed_f IS NOT NULL OR maxspeed_r IS NOT NULL OR maxspeed_s IS NOT NULL;
UPDATE network2clean SET maxspeed=maxspeed_b WHERE maxspeed_b IS NOT NULL;
UPDATE network2clean SET maxspeed=40 WHERE maxspeed_c IS NOT NULL;

-- Merge Bicycle columns: 'cycleway', 'cycleway_1', 'cycleway_l'
-- SELECT bicycle , cycleway , cycleway_1 , cycleway_l , cycleway_r FROM network2clean WHERE cycleway IS NOT NULL OR cycleway_l is not null OR cycleway_1 IS NOT NULL OR cycleway_r IS NOT NULL;
UPDATE network2clean set cycleway=cycleway_1 WHERE cycleway IS NULL AND cycleway_1 IS NOT NULL;
UPDATE network2clean set cycleway=cycleway_l WHERE cycleway IS NULL AND cycleway_l IS NOT NULL;
