I have the the following query and I need to run it many times with different names, But How can I make a function of all the queries so that I only need to run that function instead of all the queries one by one.
update clean.vehicles set make='Ford' where type ilike '%explorer%'
update clean.vehicles set make='Chevrolet' where type ilike '%lumina%'
update clean.vehicles set make='Ford' where type ilike '%crown%'
update clean.vehicles set make='Subaru' where type ilike '%suburu%'
update clean.vehicles set make='Subaru' where type ilike '%legacy%'
update clean.vehicles set make='Infiniti' where type ilike '%infinitie%'
update clean.vehicles set make='Ford' where type ilike '%windstar%'
update clean.vehicles set make='Volkswagen' where type ilike '%vw%'
update clean.vehicles set make='Mitsubishi' where type ilike '%mitsubishi%'
update clean.vehicles set make='Infiniti' where type ilike '%infiniti%'
update clean.vehicles set make='Chevrolet' where type ilike '%chev%'
update clean.vehicles set make='Chrysler' where type ilike '%plymouth%'
update clean.vehicles set make='Chrysler' where type ilike '%plymoth%
Thanks