| insert overwrite table internal_platform_db.ads_sec_ec_sup_ec_tele_item_score_query_engine_140 partition(p_date='20260608') |
| with view_union as ( |
| select uniqu_id, |
| id, |
| name, |
| sub_title, |
| property, |
| sku_list, |
| desc_info, |
| url, |
| status, |
| sale_price, |
| sale_qty, |
| stock_qty, |
| main_image_url, |
| sub_image_url, |
| category_level1_id, |
| category_level1_name, |
| category_level2_id, |
| category_level2_name, |
| category_level3_id, |
| category_level3_name, |
| shop_uniqu_id, |
| shop_id, |
| shop_name, |
| shop_url, |
| platform_id, |
| platform_name, |
| shipping_address, |
| price_text, |
| flag, |
| need_cutpic, |
| is_ocr, |
| soe_flag, |
| data_channel, |
| data_method, |
| data_source, |
| detail_image_url, |
| service_guarantee, |
| brand_id, |
| brand_name, |
| is_ad, |
| is_selfoperated, |
| create_time, |
| task_id, |
| batch_id, |
| category_level1_original, |
| category_level2_original, |
| category_level3_original, |
| brand_name_original, |
| product_name, |
| approval_number, |
| ccc_certificate_number, |
| efficacy, |
| production_place, |
| manufacturer, |
| production_license_number, |
| factory_name, |
| factory_address, |
| brand_authorization_image_url, |
| is_virtual, |
| is_invoice, |
| is_guarantee, |
| is_free_ship, |
| comments_cnt, |
| industry_id, |
| industry_name, |
| high_remark_cnt, |
| med_remark_cnt, |
| bad_remark_cnt, |
| main_image_ocr, |
| sub_image_ocr, |
| detail_image_ocr, |
| ml_category_tag, |
| sku_cnt, |
| license_collection_status, |
| screenshot_url, |
| required_quality_score, |
| core_quality_score, |
| other_quality_score, |
| '精细采集' as source_type, |
| case when required_quality_score = 1 and status = 1 then 1 else 0 end is_exp |
| from internal_platform_db.ads_sec_ec_sup_ec_tele_item_hi_query_engine_140 |
| WHERE p_hour>='2026060800' and p_hour<'2026060900' |
| union all |
| select uniqu_id, |
| id, |
| name, |
| sub_title, |
| property, |
| sku_list, |
| desc_info, |
| url, |
| status, |
| price as sale_price, |
| sale_qty, |
| stock_qty, |
| main_image_url, |
| sub_image_url, |
| category_level1_id, |
| category_level1_name, |
| category_level2_id, |
| category_level2_name, |
| category_level3_id, |
| category_level3_name, |
| shop_uniqu_id, |
| shop_id, |
| shop_name, |
| shop_url, |
| platform_id, |
| platform_name, |
| shipping_address, |
| price_text, |
| flag, |
| need_cutpic, |
| is_ocr, |
| soe_flag, |
| data_channel, |
| data_method, |
| data_source, |
| detail_image_url, |
| service_guarantee, |
| brand_id, |
| brand_name, |
| is_ad, |
| is_selfoperated, |
| create_time, |
| task_id, |
| batch_id, |
| category_level1_original, |
| category_level2_original, |
| category_level3_original, |
| brand_name_original, |
| product_name, |
| approval_number, |
| ccc_certificate_number, |
| efficacy, |
| production_place, |
| manufacturer, |
| production_license_number, |
| factory_name, |
| factory_address, |
| brand_authorization_image_url, |
| is_virtual, |
| is_invoice, |
| is_guarantee, |
| is_free_ship, |
| comments_cnt, |
| industry_id, |
| industry_name, |
| high_remark_cnt, |
| med_remark_cnt, |
| bad_remark_cnt, |
| main_image_ocr, |
| sub_image_ocr, |
| detail_image_ocr, |
| ml_category_tag, |
| sku_cnt, |
| license_collection_status, |
| screenshot_url, |
| required_quality_score, |
| core_quality_score, |
| other_quality_score, |
| '泛化采集' as source_type, |
| case when required_quality_score=1 then 1 else 0 end as is_exp |
| from internal_platform_db.ads_sec_ec_sup_ec_tele_security_platform_lk_extensive_item_query_engine_140 |
| where(p_date='20260608') |
| ) |
| select |
| uniqu_id as uniqu_id, |
| case when coalesce(id,'') <> '' then 1 else 0 end as id_socre, |
| case when coalesce(name,'') <> '' then 1 else 0 end as name_socre, |
| case when coalesce(sub_title,'') <> '' then 1 else 0 end as sub_title_socre, |
| case when coalesce(property, '') = '' then 0 else 1 end as property_socre, |
| case when coalesce(sku_list, '') = '' then 0 else 1 end as sku_list_socre, |
| case when coalesce(desc_info, '') = '' then 0 else 1 end as desc_info_socre, |
| case when coalesce(url,'') <> '' then 1 else 0 end as url_socre, |
| case when status is not null then 1 else 0 end as status_socre, |
| case when sale_price is not null then 1 else 0 end as price_socre, |
| case when sale_qty is not null then 1 else 0 end as sale_qty_socre, |
| case when stock_qty is not null then 1 else 0 end as stock_qty_socre, |
| case when coalesce(main_image_url, '') = '' then 0 else 1 end as main_image_url_socre, |
| case when coalesce(sub_image_url, '') = '' then 0 else 1 end as sub_image_url_socre, |
| case when category_level1_id is not null then 1 else 0 end as category_level1_id_socre, |
| case when coalesce(category_level1_name, '') = '' then 0 else 1 end as category_level1_name_socre, |
| case when category_level2_id is not null then 1 else 0 end as category_level2_id_socre, |
| case when coalesce(category_level2_name, '') = '' then 0 else 1 end as category_level2_name_socre, |
| case when category_level3_id is not null then 1 else 0 end as category_level3_id_socre, |
| case when coalesce(category_level3_name, '') = '' then 0 else 1 end as category_level3_name_socre, |
| case when coalesce(shop_uniqu_id,'') <> '' then 1 else 0 end as shop_uniqu_id_socre, |
| case when coalesce(shop_id, '') = '' then 0 else 1 end as shop_id_socre, |
| case when coalesce(shop_name,'') <> '' then 1 else 0 end as shop_name_socre, |
| case when coalesce(shop_url,'') <> '' then 1 else 0 end as shop_url_socre, |
| case when platform_id is not null then 1 else 0 end as platform_id_socre, |
| case when coalesce(platform_name,'') <> '' then 1 else 0 end as platform_name_socre, |
| case when coalesce(shipping_address, '') = '' then 0 else 1 end as shipping_address_socre, |
| case when coalesce(price_text, '') = '' then 0 else 1 end as price_text_socre, |
| case when flag is not null then 1 else 0 end as flag_socre, |
| case when need_cutpic is not null then 1 else 0 end as need_cutpic_socre, |
| case when is_ocr is not null then 1 else 0 end as is_ocr_socre, |
| case when soe_flag is not null then 1 else 0 end as soe_flag_socre, |
| case when data_channel is not null then 1 else 0 end as data_channel_socre, |
| case when data_method is not null then 1 else 0 end as data_method_socre, |
| case when data_source is not null then 1 else 0 end as data_source_socre, |
| case when coalesce(detail_image_url, '') = '' then 0 else 1 end as detail_image_url_socre, |
| case when coalesce(service_guarantee, '') = '' then 0 else 1 end as service_guarantee_socre, |
| case when brand_id is not null then 1 else 0 end as brand_id_socre, |
| case when coalesce(brand_name, '') = '' then 0 else 1 end as brand_name_socre, |
| case when is_ad is not null then 1 else 0 end as is_ad_socre, |
| case when is_selfoperated is not null then 1 else 0 end as is_selfoperated_socre, |
| case when create_time is not null then 1 else 0 end as create_time_socre, |
| case when coalesce(task_id,'') <> '' then 1 else 0 end as task_id_socre, |
| case when coalesce(batch_id,'') <> '' then 1 else 0 end as batch_id_socre, |
| case when coalesce(category_level1_original, '') = '' then 0 else 1 end as category_level1_original_socre, |
| case when coalesce(category_level2_original, '') = '' then 0 else 1 end as category_level2_original_socre, |
| case when coalesce(category_level3_original, '') = '' then 0 else 1 end as category_level3_original_socre, |
| case when coalesce(brand_name_original, '') = '' then 0 else 1 end as brand_name_original_socre, |
| case when coalesce(product_name, '') = '' then 0 else 1 end as product_name_socre, |
| case when coalesce(approval_number, '') = '' then 0 else 1 end as approval_number_socre, |
| case when coalesce(ccc_certificate_number, '') = '' then 0 else 1 end as ccc_certificate_number_socre, |
| case when coalesce(efficacy, '') = '' then 0 else 1 end as efficacy_socre, |
| case when coalesce(production_place, '') = '' then 0 else 1 end as production_place_socre, |
| case when coalesce(manufacturer, '') = '' then 0 else 1 end as manufacturer_socre, |
| case when coalesce(production_license_number, '') = '' then 0 else 1 end as production_license_number_socre, |
| case when coalesce(factory_name, '') = '' then 0 else 1 end as factory_name_socre, |
| case when coalesce(factory_address, '') = '' then 0 else 1 end as factory_address_socre, |
| case when coalesce(brand_authorization_image_url, '') = '' then 0 else 1 end as brand_authorization_image_url_socre, |
| case when is_virtual is not null then 1 else 0 end as is_virtual_socre, |
| case when is_invoice is not null then 1 else 0 end as is_invoice_socre, |
| case when is_guarantee is not null then 1 else 0 end as is_guarantee_socre, |
| case when is_free_ship is not null then 1 else 0 end as is_free_ship_socre, |
| case when comments_cnt is not null then 1 else 0 end as comments_cnt_socre, |
| case when coalesce(industry_id, '') = '' then 0 else 1 end as industry_id_socre, |
| case when coalesce(industry_name, '') = '' then 0 else 1 end as industry_name_socre, |
| case when high_remark_cnt is not null then 1 else 0 end as high_remark_cnt_socre, |
| case when med_remark_cnt is not null then 1 else 0 end as med_remark_cnt_socre, |
| case when bad_remark_cnt is not null then 1 else 0 end as bad_remark_cnt_socre, |
| case when coalesce(main_image_ocr, '') = '' then 0 else 1 end as main_image_ocr_socre, |
| case when coalesce(sub_image_ocr, '') = '' then 0 else 1 end as sub_image_ocr_socre, |
| case when coalesce(detail_image_ocr, '') = '' then 0 else 1 end as detail_image_ocr_socre, |
| case when ml_category_tag is not null then 1 else 0 end as ml_category_tag_socre, |
| null as logo_brand_socre, |
| null as similarity_img_url_socre, |
| case when sku_cnt is not null then 1 else 0 end as sku_cnt_socre, |
| case when license_collection_status is not null then 1 else 0 end as license_collection_status_socre, |
| null as data_method_keyword_socre, |
| null as task_name_socre, |
| case when screenshot_url is not null then 1 else 0 end as screenshot_url_socre, |
| required_quality_score, |
| core_quality_score, |
| other_quality_score, |
| platform_name, |
| source_type, |
| is_exp, |
| case when status <>1 then 1 else 0 end as is_off_shelf |
| from view_union |