
-- autoSyncId is assumed to be unique (though technically it is not).

--
-- FORD F1 1949 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'FORD');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'F1' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '1949' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '362514';


--
-- FORD F-100 1953 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'FORD');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'F-100' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '1953' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '362979';


--
-- FORD F-100 1955 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'FORD');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'F-100' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '1955' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '365537';


--
-- MERCEDES-BENZ 300SL 1955 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'MERCEDES-BENZ');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '300SL' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '1955' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '351545';


--
-- FORD F-100 1956 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'FORD');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'F-100' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '1956' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '365538';


--
-- MERCEDES-BENZ 190SL 1959 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'MERCEDES-BENZ');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '190SL' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '1959' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '356940';


--
-- FORD Mustang 1965 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'FORD');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Mustang' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '1965' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '350334';


--
-- FORD Mustang 1965 Shelby GT-350
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'FORD');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Mustang' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '1965' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Shelby GT-350' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '364506';


--
-- FORD F-100 1966 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'FORD');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'F-100' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '1966' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '365547';


--
-- FORD Mustang 1966 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'FORD');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Mustang' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '1966' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '350339';


--
-- FORD Mustang 1967 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'FORD');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Mustang' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '1967' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '350343';


--
-- MERCEDES-BENZ 280SL 1971 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'MERCEDES-BENZ');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '280SL' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '1971' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '351527';


--
-- FORD Mustang 1972 Mach 1
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'FORD');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Mustang' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '1972' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Mach 1' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '350376';


--
-- TOYOTA Pickup 1983 SR5
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'TOYOTA');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Pickup' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '1983' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'SR5' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '314530';


--
-- MERCEDES-BENZ 560SL 1987 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'MERCEDES-BENZ');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '560SL' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '1987' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '305203';


--
-- TOYOTA Land Cruiser 1987 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'TOYOTA');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Land Cruiser' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '1987' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '313207';


--
-- FORD Ranger 1991 Custom
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'FORD');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Ranger' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '1991' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Custom' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '311788';


--
-- FORD F-150 2023 XLT Lariat
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'FORD');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'F-150' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2023' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'XLT Lariat' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '311462';


--
-- MERCEDES-BENZ 500E 1993 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'MERCEDES-BENZ');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '500E' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '1993' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '301687';


--
-- LAND ROVER Defender 90 1995 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'LAND ROVER');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Defender 90' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '1995' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '310724';


--
-- BMW Z8 2001 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Z8' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2001' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2797';


--
-- BMW Z8 2002 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Z8' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2002' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2798';


--
-- CADILLAC Seville 2002 SLS
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Seville' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2002' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'SLS' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '4495';


--
-- CADILLAC Seville 2002 STS
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Seville' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2002' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'STS' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '4496';


--
-- BMW Z8 2003 Alpina
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Z8' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2003' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Alpina' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2799';


--
-- BMW Z8 2003 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Z8' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2003' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2800';


--
-- CADILLAC CTS 2003 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'CTS' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2003' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '4168';


--
-- CADILLAC CTS 2003 Luxury
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'CTS' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2003' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Luxury' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '4169';


--
-- CADILLAC CTS 2003 Luxury Sport
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'CTS' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2003' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Luxury Sport' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '4170';


--
-- CADILLAC Seville 2003 SLS
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Seville' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2003' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'SLS' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '4497';


--
-- CADILLAC Seville 2003 STS
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Seville' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2003' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'STS' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '4498';


--
-- BMW X3 2004 2.5i
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'X3' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2004' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = '2.5i' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '48186';


--
-- BMW X3 2004 3.0i
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'X3' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2004' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = '3.0i' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '48187';


--
-- CADILLAC CTS 2004 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'CTS' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2004' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '4171';


--
-- CADILLAC CTS 2004 V
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'CTS' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2004' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'V' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '4173';


--
-- CADILLAC Seville 2004 SLS
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Seville' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2004' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'SLS' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '4499';


--
-- CADILLAC Seville 2004 STS
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Seville' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2004' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'STS' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '83270';


--
-- CADILLAC SRX 2004 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'SRX' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2004' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '46966';


--
-- BMW 760Li 2005 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '760Li' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2005' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2638';


--
-- BMW X3 2005 2.5i
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'X3' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2005' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = '2.5i' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '48188';


--
-- BMW X3 2005 3.0i
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'X3' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2005' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = '3.0i' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '48189';


--
-- BMW X5 2005 4.4i
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'X5' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2005' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = '4.4i' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '21955';


--
-- BMW X5 2005 4.8is
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'X5' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2005' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = '4.8is' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '21956';


--
-- BMW X5 2005 3.0i
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'X5' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2005' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = '3.0i' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '21957';


--
-- BMW Z4 2005 2.5i
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Z4' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2005' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = '2.5i' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2742';


--
-- BMW Z4 2005 3.0i
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Z4' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2005' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = '3.0i' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2743';


--
-- CADILLAC CTS 2005 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'CTS' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2005' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '4174';


--
-- CADILLAC CTS 2005 V
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'CTS' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2005' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'V' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '4176';


--
-- CADILLAC SRX 2005 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'SRX' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2005' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '46970';


--
-- BMW 650i 2006 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '650i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2006' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '13300';


--
-- BMW 650i 2006 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '650i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2006' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '13301';


--
-- BMW 750Li 2006 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '750Li' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2006' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '12573';


--
-- BMW 760Li 2006 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '760Li' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2006' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2639';


--
-- BMW M6 2006 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'M6' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2006' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2702';


--
-- BMW X3 2006 3.0i
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'X3' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2006' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = '3.0i' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '48190';


--
-- BMW X3 2006 2.5i
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'X3' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2006' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = '2.5i' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '48191';


--
-- BMW X5 2006 3.0i
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'X5' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2006' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = '3.0i' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '21958';


--
-- BMW X5 2006 4.4i
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'X5' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2006' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = '4.4i' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '21959';


--
-- BMW X5 2006 4.8is
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'X5' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2006' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = '4.8is' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '21960';


--
-- BMW Z4 2006 M Roadster
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Z4' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2006' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'M Roadster' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2744';


--
-- BMW Z4 2006 Roadster 3.0i
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Z4' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2006' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Roadster 3.0i' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2745';


--
-- BMW Z4 2006 Roadster 3.0si
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Z4' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2006' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Roadster 3.0si' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2746';


--
-- BMW Z4 2006 M Coupe
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Z4' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2006' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'M Coupe' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2747';


--
-- BMW Z4 2006 Coupe 3.0si
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Z4' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2006' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Coupe 3.0si' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2748';


--
-- CADILLAC CTS 2006 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'CTS' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2006' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '4177';


--
-- CADILLAC CTS 2006 V
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'CTS' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2006' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'V' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '4179';


--
-- CADILLAC DTS 2006 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'DTS' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2006' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '12916';


--
-- CADILLAC DTS 2006 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'DTS' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2006' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '12917';


--
-- CADILLAC DTS 2006 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'DTS' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2006' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '12918';


--
-- CADILLAC SRX 2006 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'SRX' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2006' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '46977';


--
-- CADILLAC STS 2006 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'STS' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2006' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '12260';


--
-- BMW 650i 2007 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '650i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2007' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '13302';


--
-- BMW 650i 2007 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '650i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2007' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '13303';


--
-- BMW 750Li 2007 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '750Li' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2007' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '12574';


--
-- BMW 760Li 2007 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '760Li' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2007' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2640';


--
-- BMW M6 2007 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'M6' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2007' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2703';


--
-- BMW M6 2007 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'M6' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2007' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2704';


--
-- BMW X3 2007 3.0si
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'X3' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2007' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = '3.0si' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '48192';


--
-- BMW X5 2007 3.0si
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'X5' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2007' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = '3.0si' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '21961';


--
-- BMW X5 2007 4.8i
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'X5' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2007' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = '4.8i' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '21962';


--
-- BMW Z4 2007 Coupe 3.0si
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Z4' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2007' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Coupe 3.0si' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2749';


--
-- BMW Z4 2007 M Coupe
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Z4' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2007' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'M Coupe' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2750';


--
-- BMW Z4 2007 M Roadster
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Z4' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2007' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'M Roadster' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2751';


--
-- BMW Z4 2007 Roadster 3.0i
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Z4' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2007' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Roadster 3.0i' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2752';


--
-- BMW Z4 2007 Roadster 3.0si
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Z4' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2007' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Roadster 3.0si' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2753';


--
-- CADILLAC CTS 2007 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'CTS' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2007' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '4180';


--
-- CADILLAC CTS 2007 V
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'CTS' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2007' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'V' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '4182';


--
-- CADILLAC DTS 2007 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'DTS' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2007' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '12919';


--
-- CADILLAC DTS 2007 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'DTS' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2007' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '12920';


--
-- CADILLAC DTS 2007 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'DTS' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2007' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '12921';


--
-- CADILLAC DTS 2007 Luxury
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'DTS' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2007' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Luxury' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '12922';


--
-- CADILLAC SRX 2007 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'SRX' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2007' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '46984';


--
-- CADILLAC STS 2007 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'STS' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2007' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '12265';


--
-- CADILLAC STS 2007 V
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'STS' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2007' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'V' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '12269';


--
-- BMW 128i 2008 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '128i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2008' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15362';


--
-- BMW 128i 2008 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '128i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2008' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15363';


--
-- BMW 135i 2008 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '135i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2008' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15374';


--
-- BMW 135i 2008 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '135i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2008' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15375';


--
-- BMW 535i 2008 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '535i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2008' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2583';


--
-- BMW 650i 2008 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '650i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2008' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '13304';


--
-- BMW 650i 2008 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '650i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2008' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '13305';


--
-- BMW 750Li 2008 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '750Li' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2008' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '12575';


--
-- BMW 760Li 2008 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '760Li' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2008' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2641';


--
-- BMW M6 2008 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'M6' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2008' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2705';


--
-- BMW M6 2008 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'M6' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2008' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2706';


--
-- BMW X3 2008 3.0si
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'X3' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2008' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = '3.0si' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '48193';


--
-- BMW X3 2008 3.0i
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'X3' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2008' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = '3.0i' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '48194';


--
-- BMW X5 2008 4.8i
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'X5' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2008' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = '4.8i' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '21963';


--
-- BMW X5 2008 3.0si
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'X5' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2008' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = '3.0si' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '21964';


--
-- BMW X6 2008 xDrive35i
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'X6' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2008' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'xDrive35i' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '55162';


--
-- BMW X6 2008 xDrive50i
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'X6' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2008' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'xDrive50i' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '55163';


--
-- BMW Z4 2008 Roadster 3.0si
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Z4' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2008' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Roadster 3.0si' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2754';


--
-- BMW Z4 2008 Roadster 3.0i
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Z4' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2008' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Roadster 3.0i' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2755';


--
-- BMW Z4 2008 M Roadster
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Z4' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2008' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'M Roadster' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2756';


--
-- BMW Z4 2008 M Coupe
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Z4' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2008' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'M Coupe' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2757';


--
-- BMW Z4 2008 Coupe 3.0si
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Z4' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2008' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Coupe 3.0si' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2758';


--
-- BMW 128i 2009 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '128i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2009' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15364';


--
-- BMW 128i 2009 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '128i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2009' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15365';


--
-- BMW 135i 2009 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '135i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2009' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15376';


--
-- BMW 135i 2009 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '135i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2009' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15377';


--
-- BMW 328i xDrive 2009 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '328i xDrive' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2009' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15906';


--
-- BMW 328i xDrive 2009 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '328i xDrive' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2009' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15907';


--
-- BMW 328i xDrive 2009 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '328i xDrive' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2009' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15908';


--
-- BMW 535i 2009 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '535i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2009' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2584';


--
-- BMW 650i 2009 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '650i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2009' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '13306';


--
-- BMW 650i 2009 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '650i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2009' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '13307';


--
-- BMW 750Li 2009 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '750Li' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2009' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '12576';


--
-- BMW M6 2009 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'M6' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2009' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2707';


--
-- BMW M6 2009 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'M6' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2009' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2708';


--
-- BMW X3 2009 xDrive30i
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'X3' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2009' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'xDrive30i' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '48195';


--
-- BMW X5 2009 xDrive48i
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'X5' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2009' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'xDrive48i' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '21965';


--
-- BMW X5 2009 xDrive30i
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'X5' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2009' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'xDrive30i' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '21966';


--
-- BMW X5 2009 xDrive35d
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'X5' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2009' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'xDrive35d' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '21967';


--
-- BMW X6 2009 xDrive35i
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'X6' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2009' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'xDrive35i' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '55164';


--
-- BMW X6 2009 xDrive50i
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'X6' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2009' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'xDrive50i' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '55165';


--
-- BMW Z4 2009 sDrive30i
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Z4' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2009' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'sDrive30i' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2759';


--
-- BMW Z4 2009 sDrive35i
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Z4' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2009' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'sDrive35i' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2760';


--
-- BMW 128i 2010 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '128i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2010' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15366';


--
-- BMW 128i 2010 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '128i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2010' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15367';


--
-- BMW 135i 2010 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '135i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2010' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15378';


--
-- BMW 135i 2010 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '135i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2010' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15379';


--
-- BMW 328i xDrive 2010 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '328i xDrive' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2010' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15909';


--
-- BMW 328i xDrive 2010 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '328i xDrive' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2010' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15910';


--
-- BMW 328i xDrive 2010 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '328i xDrive' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2010' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15911';


--
-- BMW 535i 2010 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '535i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2010' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2586';


--
-- BMW 535i 2010 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '535i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2010' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2587';


--
-- BMW 550i GT 2010 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '550i GT' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2010' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '16353';


--
-- BMW 650i 2010 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '650i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2010' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '13308';


--
-- BMW 650i 2010 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '650i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2010' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '13309';


--
-- BMW 750Li 2010 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '750Li' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2010' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '12577';


--
-- BMW 760Li 2010 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '760Li' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2010' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2642';


--
-- BMW M6 2010 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'M6' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2010' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2709';


--
-- BMW M6 2010 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'M6' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2010' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2710';


--
-- BMW X3 2010 xDrive30i
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'X3' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2010' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'xDrive30i' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '48196';


--
-- BMW X3 2010 xDrive28i
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'X3' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2010' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'xDrive28i' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '48197';


--
-- BMW X5 2010 xDrive30i
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'X5' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2010' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'xDrive30i' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '21968';


--
-- BMW 128i 2011 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '128i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2011' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15368';


--
-- BMW 128i 2011 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '128i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2011' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15369';


--
-- BMW 135i 2011 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '135i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2011' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15380';


--
-- BMW 135i 2011 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '135i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2011' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15381';


--
-- BMW 328i xDrive 2011 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '328i xDrive' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2011' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15912';


--
-- BMW 328i xDrive 2011 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '328i xDrive' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2011' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15913';


--
-- BMW 328i xDrive 2011 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '328i xDrive' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2011' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15914';


--
-- BMW 535i 2011 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '535i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2011' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2588';


--
-- BMW 550i GT 2011 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '550i GT' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2011' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '16354';


--
-- BMW 128i 2012 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '128i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2012' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15370';


--
-- BMW 128i 2012 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '128i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2012' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15371';


--
-- BMW 135i 2012 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '135i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2012' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15382';


--
-- BMW 135i 2012 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '135i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2012' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15383';


--
-- BMW 328i xDrive 2012 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '328i xDrive' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2012' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15915';


--
-- BMW 328i xDrive 2012 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '328i xDrive' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2012' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15916';


--
-- BMW 535i 2012 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '535i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2012' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '2589';


--
-- BMW 128i 2013 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '128i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2013' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15372';


--
-- BMW 128i 2013 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '128i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2013' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15373';


--
-- BMW 135i 2013 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '135i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2013' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15384';


--
-- BMW 135i 2013 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '135i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2013' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '15385';


--
-- ALFA ROMEO 4C 2019 Spider
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'ALFA ROMEO');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '4C' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2019' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Spider' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '18901';


--
-- ALFA ROMEO 4C 2020 Spider
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'ALFA ROMEO');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '4C' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2020' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Spider' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '18902';


--
-- ALFA ROMEO 4C 2020 Spider Italia
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'ALFA ROMEO');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '4C' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2020' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Spider Italia' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '18903';


--
-- ALFA ROMEO Giulia 2020 TI
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'ALFA ROMEO');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Giulia' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2020' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'TI' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '14668';


--
-- ALFA ROMEO Giulia 2020 Sport
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'ALFA ROMEO');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Giulia' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2020' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Sport' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '14671';


--
-- ALFA ROMEO Stelvio 2020 TI
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'ALFA ROMEO');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Stelvio' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2020' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'TI' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '62591';


--
-- ALFA ROMEO Stelvio 2020 Sport
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'ALFA ROMEO');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Stelvio' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2020' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Sport' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '62592';


--
-- AUDI A3 2020 Premium
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'AUDI');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'A3' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2020' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Premium' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '12862';


--
-- AUDI A3 2020 Premium Plus
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'AUDI');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'A3' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2020' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Premium Plus' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '12863';


--
-- AUDI A3 Quattro 2020 Komfort
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'AUDI');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'A3 Quattro' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2020' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Komfort' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '18595';


--
-- AUDI A3 Quattro 2020 Premium Plus
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'AUDI');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'A3 Quattro' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2020' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Premium Plus' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '79484';


--
-- AUDI A3 Quattro 2020 Premium
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'AUDI');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'A3 Quattro' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2020' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Premium' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '79486';


--
-- ALFA ROMEO Giulia 2021 TI
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'ALFA ROMEO');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Giulia' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2021' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'TI' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '14673';


--
-- ALFA ROMEO Giulia 2021 Sprint
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'ALFA ROMEO');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Giulia' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2021' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Sprint' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '83466';


--
-- ALFA ROMEO Stelvio 2021 TI
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'ALFA ROMEO');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Stelvio' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2021' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'TI' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '62597';


--
-- ALFA ROMEO Stelvio 2021 Sprint
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'ALFA ROMEO');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Stelvio' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2021' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Sprint' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '83533';


--
-- ALFA ROMEO Giulia 2022 TI
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'ALFA ROMEO');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Giulia' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2022' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'TI' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '250871';


--
-- ALFA ROMEO Giulia 2022 Veloce
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'ALFA ROMEO');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Giulia' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2022' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Veloce' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '250873';


--
-- ALFA ROMEO Giulia 2022 Sprint
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'ALFA ROMEO');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Giulia' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2022' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Sprint' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '250874';


--
-- ALFA ROMEO Stelvio 2022 TI
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'ALFA ROMEO');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Stelvio' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2022' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'TI' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '251053';


--
-- ALFA ROMEO Stelvio 2022 Sprint
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'ALFA ROMEO');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Stelvio' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2022' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Sprint' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '251055';


--
-- ALFA ROMEO Stelvio 2022 Veloce
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'ALFA ROMEO');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Stelvio' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2022' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Veloce' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '274375';


--
-- AUDI A3 2022 Prestige
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'AUDI');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'A3' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2022' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Prestige' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '273843';


--
-- AUDI A3 2022 Premium Plus
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'AUDI');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'A3' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2022' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Premium Plus' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '273844';


--
-- AUDI A3 2022 Premium
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'AUDI');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'A3' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2022' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Premium' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '273845';


--
-- AUDI A3 Quattro 2022 Premium Plus
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'AUDI');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'A3 Quattro' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2022' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Premium Plus' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '273847';


--
-- AUDI A3 Quattro 2022 Premium
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'AUDI');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'A3 Quattro' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2022' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Premium' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '273848';


--
-- AUDI A3 Quattro 2022 Komfort
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'AUDI');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'A3 Quattro' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2022' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Komfort' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '274315';


--
-- ALFA ROMEO Giulia 2023 Veloce
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'ALFA ROMEO');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Giulia' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2023' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Veloce' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '341697';


--
-- ALFA ROMEO Stelvio 2023 Veloce
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'ALFA ROMEO');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Stelvio' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2023' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Veloce' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '341699';


--
-- AUDI A3 2023 Premium Plus
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'AUDI');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'A3' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2023' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Premium Plus' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '296925';


--
-- AUDI A3 2023 Premium
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'AUDI');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'A3' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2023' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Premium' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '296927';


--
-- AUDI A3 Quattro 2023 Premium Plus
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'AUDI');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'A3 Quattro' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2023' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Premium Plus' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '296928';


--
-- AUDI A3 Quattro 2023 Premium
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'AUDI');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'A3 Quattro' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2023' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Premium' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '296930';


--
-- AUDI A3 Quattro 2023 Komfort
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'AUDI');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'A3 Quattro' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2023' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Komfort' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '341876';


--
-- AUDI S3 2023 Premium
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'AUDI');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'S3' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2023' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Premium' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '296920';


--
-- AUDI S3 2023 Prestige
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'AUDI');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'S3' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2023' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Prestige' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '296921';


--
-- AUDI S3 2023 Premium Plus
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'AUDI');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'S3' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2023' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Premium Plus' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '296922';


--
-- BMW 430i Gran Coupe 2024 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '430i Gran Coupe' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2024' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '377792';


--
-- BMW 430i xDrive Gran Coupe 2024 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '430i xDrive Gran Coupe' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2024' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '377791';


--
-- BMW 840i xDrive 2024 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = '840i xDrive' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2024' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '378979';


--
-- BMW iX 2024 M60
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'iX' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2024' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'M60' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '377891';


--
-- BMW M4 2024 Competition xDrive
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'M4' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2024' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Competition xDrive' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '378944';


--
-- BMW M4 2024 Competition xDrive
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'M4' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2024' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Competition xDrive' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '378945';


--
-- BMW M440i 2024 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'M440i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2024' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '377859';


--
-- BMW M440i 2024 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'M440i' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2024' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '377860';


--
-- BMW M8 2024 Competition
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'M8' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2024' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Competition' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '378692';


--
-- BMW M8 2024 Competition
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'M8' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2024' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Competition' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '378693';


--
-- BMW M8 Gran Coupe 2024 Competition
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'M8 Gran Coupe' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2024' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Competition' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '378691';


--
-- BMW M850i xDrive 2024 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'M850i xDrive' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2024' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '378976';


--
-- BMW X7 2024 M60i
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'BMW');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'X7' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2024' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'M60i' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '377890';


--
-- CADILLAC LYRIQ 2024 Luxury
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'LYRIQ' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2024' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Luxury' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '377843';


--
-- CADILLAC XT4 2024 Premium Luxury
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'XT4' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2024' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Premium Luxury' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '378695';


--
-- CADILLAC XT6 2024 Premium Luxury
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'CADILLAC');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'XT6' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2024' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Premium Luxury' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '379141';


--
-- LAND ROVER Range Rover 2024 Autobiography
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'LAND ROVER');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'Range Rover' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2024' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Autobiography' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '378408';


--
-- LEXUS NX350 2024 F Sport Handling
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'LEXUS');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'NX350' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2024' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'F Sport Handling' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '378404';


--
-- LEXUS NX350h 2024 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'LEXUS');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'NX350h' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2024' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '377970';


--
-- LEXUS NX450h+ 2024 Base
--
SET @level1 = (SELECT id FROM `%%XC%%_level1` WHERE value = 'LEXUS');
SET @level2 = (SELECT id FROM `%%XC%%_level2` WHERE value = 'NX450h+' AND level1_id = @level1);
SET @level3 = (SELECT id FROM `%%XC%%_level3` WHERE value = '2024' AND level2_id = @level2);
SET @level4 = (SELECT id FROM `%%XC%%_level4` WHERE value = 'Base' AND level3_id = @level3);
UPDATE
    `%%XC%%_vehicle_attribute_groups`
SET
    level1_id = @level1, level2_id = @level2, level3_id = @level3, level4_id = @level4
WHERE
    autoSyncId = '377969';
