CREATE OR REPLACE FUNCTION core.get_county_id_by_county_code(character varying) RETURNS integer LANGUAGE plpgsql STABLE AS $function$ BEGIN RETURN county_id FROM core.counties WHERE county_code = $1; END $function$