# Compute multi-dimensional CUBE aggregation of user open-start-path data by referer_type, referer, and path (HiveSQL)

## Prompt
Task Objective: Compute multi-dimensional aggregation metrics from the user open-start-path detail table, outputting UV and first-time UV across three dimension combinations: application category (`referer_type`), source application (`referer`), and launch path (`path`).

Inputs:
- `internal_platform_db.t_ed_mapservice_user_open_start_path_dwd_di_query_engine_135`
- `internal_platform_db.t_ed_mapservice_user_q36_active_dwd_di_query_engine_135`

Processing Rules:
1. Main table filter: `ds=20260608`, and `referer` must be in the specified lists of application package names/keys for three categories (FoodChainA, QuickDog, JD).
2. Path cleansing: Process the `path` field according to rules — if it matches `qqmap://map/routeplan?type=\w+`, retain the original value; if it contains `?`, truncate to the part before the question mark; if it is empty/null/`'NULL'`, set it to `'未知'`; otherwise, retain the original value.
3. `referer_type` mapping: Map the `referer` value to one of three categories: `'FoodChainA'`, `'CourierCoB'` (QuickDog), or `'EcommerceC'` (JD).
4. Join: Join with `t_ed_mapservice_user_q36_active_dwd_di_query_engine_135` (`ds=20260608`, `uin` deduplicated) on `uin`, retaining active users.
5. Aggregation: Group by `referer_type`, `CUBE(referer, path)`, computing `count(distinct uin)` as `uv` and `count(distinct case when is_first=1 then uin end)` as `first_uv`.
6. CUBE result processing: For dimensions where `grouping` is 1, set the value to `'total'`.

Output Requirements:
- Field order: `referer_type`, `referer`, `path`, `uv`, `first_uv`, `ds`
- `referer` and `path` display as `'total'` on CUBE summary rows
- `uv` is of type BIGINT, `first_uv` is of type BIGINT

Write Requirements:
- Output table: `internal_platform_db.t_md_mapservice_user_open_start_path_dwa_di_cand_query_engine_135`
- Partition: `ds=20260608`
- Write method: `INSERT OVERWRITE`

Please write the final HiveSQL to `result.sql` and execute it.

## Reference Solution
insert overwrite table internal_platform_db.t_md_mapservice_user_open_start_path_dwa_di_query_engine_135   partition(ds=20260608)
with  t as (
select 
event_time,platform,app_version,channel,t1.uin,event_code,event_value,city,brand,device_id_type,bg,event_timestamp,referer,path,is_first
,case when referer in ('com.foodchain_a.android.activity','FoodChainA','com.jooyum.s2pFlutter','com.jooyum.s2p','ZPVBZ-HDXWU-NQCVT-G76JZ-NMJ2H-M4FRN','ZDSBZ-HICKQ-YBW5C-4KX5E-QOXEZ-MPBI2','XTJBZ-F546Z-I6GXC-7NWJS-35WDV-RSFP5','WPRBZ-VIY6Q-NS45V-457XZ-3XUZJ-ZEFZH','U7VBZ-6XSWI-5VLGP-UYDPQ-EYNTF-4EFEJ','TUPBZ-M7GWQ-EYL5Q-2BYZ2-5WDQV-C7B7E','TOPBZ-WGE65-MNLI5-IGBOS-X3IHQ-YBBY4','RP5BZ-K5ZKZ-2CTXC-T3VKM-UQDO3-FRFYB','QB3BZ-KMC6W-G4NRU-YON5I-ORFV2-RCBFD','OZIBZ-GKVCN-ZHSFP-SAA5H-UO3ZV-D3F5Q','OZCBZ-ZN4KT-K7RXH-VFR3V-J4TPZ-OFBGJ','OW5BZ-QNACB-2RGUS-NV54M-4TEU2-JQB24','KBJBZ-UNHKM-KQH6E-67NMF-DDCGT-LLBWQ','KAWBZ-227KP-F73D6-L4JDM-6K6H5-SYFVU','IARBZ-EDBCA-BYCK7-CW7UG-LF5JS-DWFWO','HW3BZ-RQCLT-CKBXW-VWELQ-IIMGS-YVF7J','7YLBZ-2IKWM-65U64-66SIM平台Q-Y5SG7-MBBO6','3NVBZ-LALKB-A5CUC-N3IYU-S3FV6-TAFZY','3FABZ-UUIE7-TMAXI-HXWPA-XQONZ-IWBTP','2K2BZ-NVFKJ-7T3FU-DPCNP-X3IJO-N2FE6') then 'FoodChainA' 
when referer in ('com.couriercob.huoyun','couriercob','topapp.couriercob.directionx','topapp.couriercob.direction') then 'CourierCoB' 
when referer in ('com.delivery_d.mobile.android','EcommerceC秒送骑士','达达秒送骑士','达达骑士','com.dada.knight.hm','com.ecommerce_c.mall','ZZLBZ-PDU6F-POPJ3-NAMUM-GQJXV-WNBQI','ZX5BZ-53WHV-6QAP5-UZRK5-O3D5J-2PF2J','ZTABZ-76XRW-2ZRRR-OUC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L-QDYJS-R6B6T','3PFBZ-XNV67-ZZFXP-HROTO-DXXI3-LFFK4','3JQBZ-XLML4-YZWUG-X5JJY-RXYY2-IFFX4','3HHBZ-QJ6C6-PJSSA-ELG33-X3FVF-HMBNX','3H4BZ-5UXLO-3P2WE-SYGSW-KOUX5-SWFEN','3F7BZ-FTT3G-LFGQE-I7CAD-LIW47-PBBET','3EYBZ-MBJW4-ZMFUH-XHDPO-CUOOH-OOBQM','3DIBZ-KYXY3-GZW3C-OPJ5O-RRF62-7NBPU','37RBZ-6DN66-N2KSK-EH6MX-VAV3F-QLBYJ','36FBZ-PPF3S-UCCO6-6JYDP-EJUGJ-FLBV7','2Z4BZ-R7S6W-COZRH-OH35E-EM52T-FLBGX','2YZBZ-C7L3W-GPTRB-YOGKI-3I2XE-WCBBJ','2YUBZ-WXWLJ-55FFS-KWX4Q-BWXQS-WMFLS','2UBBZ-MKIWP-MNGDA-VGW72-VKZBH-2DFZR','2OOBZ-SPFE4-UJ7UB-KCSVO-POIU6-4VFME','2ODBZ-FEIK4-RHYUZ-XFUVG-X3DCF-7SB5K','2J5BZ-NFMR6-QO3SZ-M5S34-KXMRQ-MZFC7','2EVBZ-MGC6J-2THFU-XGYYL-CHH5T-5QBCB') then 'EcommerceC' else '其他' end as referer_type
from 
(
select 
event_time,platform,app_version,channel,uin,event_code,event_value,city,brand,device_id_type,bg,event_timestamp,referer
,CASE WHEN path RLIKE '^qqmap://map/routeplan\\?type=\\w+$' THEN path
  WHEN INSTR(path, '?') > 0 THEN SUBSTR(path, 1, INSTR(path, '?') - 1)
  WHEN path = '' or  path is null  or  path = 'NULL'  THEN '未知'
  ELSE path end as path
,is_first
from  internal_platform_db.t_ed_mapservice_user_open_start_path_dwd_di_query_engine_135
where ds = 20260608
and referer in ('com.foodchain_a.android.activity','FoodChainA','com.jooyum.s2pFlutter','com.jooyum.s2p','ZPVBZ-HDXWU-NQCVT-G76JZ-NMJ2H-M4FRN','ZDSBZ-HICKQ-YBW5C-4KX5E-QOXEZ-MPBI2','XTJBZ-F546Z-I6GXC-7NWJS-35WDV-RSFP5','WPRBZ-VIY6Q-NS45V-457XZ-3XUZJ-ZEFZH','U7VBZ-6XSWI-5VLGP-UYDPQ-EYNTF-4EFEJ','TUPBZ-M7GWQ-EYL5Q-2BYZ2-5WDQV-C7B7E','TOPBZ-WGE65-MNLI5-IGBOS-X3IHQ-YBBY4','RP5BZ-K5ZKZ-2CTXC-T3VKM-UQDO3-FRFYB','QB3BZ-KMC6W-G4NRU-YON5I-ORFV2-RCBFD','OZIBZ-GKVCN-ZHSFP-SAA5H-UO3ZV-D3F5Q','OZCBZ-ZN4KT-K7RXH-VFR3V-J4TPZ-OFBGJ','OW5BZ-QNACB-2RGUS-NV54M-4TEU2-JQB24','KBJBZ-UNHKM-KQH6E-67NMF-DDCGT-LLBWQ','KAWBZ-227KP-F73D6-L4JDM-6K6H5-SYFVU','IARBZ-EDBCA-BYCK7-CW7UG-LF5JS-DWFWO','HW3BZ-RQCLT-CKBXW-VWELQ-IIMGS-YVF7J','7YLBZ-2IKWM-65U64-66SIM平台Q-Y5SG7-MBBO6','3NVBZ-LALKB-A5CUC-N3IYU-S3FV6-TAFZY','3FABZ-UUIE7-TMAXI-HXWPA-XQONZ-IWBTP','2K2BZ-NVFKJ-7T3FU-DPCNP-X3IJO-N2FE6',
'com.couriercob.huoyun','couriercob','topapp.couriercob.directionx','topapp.couriercob.direction',
'com.delivery_d.mobile.android','EcommerceC秒送骑士','达达秒送骑士','达达骑士','com.dada.knight.hm','com.ecommerce_c.mall','ZZLBZ-PDU6F-POPJ3-NAMUM-GQJXV-WNBQI','ZX5BZ-53WHV-6QAP5-UZRK5-O3D5J-2PF2J','ZTABZ-76XRW-2ZRRR-OUCJW-47TS5-MXFIG','ZKKBZ-OFMWJ-DUWFN-FIM平台Q5U-ULITH-TXFCF','ZFVBZ-3P2KU-EKWVK-BN4O2-G6BWZ-Z2FIZ','Z6SBZ-ZB7CV-ZWUPO-5XZPI-6ZB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-5UXLO-3P2WE-SYGSW-KOUX5-SWFEN','3F7BZ-FTT3G-LFGQE-I7CAD-LIW47-PBBET','3EYBZ-MBJW4-ZMFUH-XHDPO-CUOOH-OOBQM','3DIBZ-KYXY3-GZW3C-OPJ5O-RRF62-7NBPU','37RBZ-6DN66-N2KSK-EH6MX-VAV3F-QLBYJ','36FBZ-PPF3S-UCCO6-6JYDP-EJUGJ-FLBV7','2Z4BZ-R7S6W-COZRH-OH35E-EM52T-FLBGX','2YZBZ-C7L3W-GPTRB-YOGKI-3I2XE-WCBBJ','2YUBZ-WXWLJ-55FFS-KWX4Q-BWXQS-WMFLS','2UBBZ-MKIWP-MNGDA-VGW72-VKZBH-2DFZR','2OOBZ-SPFE4-UJ7UB-KCSVO-POIU6-4VFME','2ODBZ-FEIK4-RHYUZ-XFUVG-X3DCF-7SB5K','2J5BZ-NFMR6-QO3SZ-M5S34-KXMRQ-MZFC7','2EVBZ-MGC6J-2THFU-XGYYL-CHH5T-5QBCB'
)
)t1 
join 
(
SELECT uin
from internal_platform_db.t_ed_mapservice_user_q36_active_dwd_di_query_engine_135
where ds= 20260608
group by  uin
)t2 on t1.uin = t2.uin 
)
select
    referer_type
    ,if(grouping(referer) = 1,'total',referer) as referer 
    ,if(grouping(path) = 1,'total',path) as path
	,count(distinct  uin) 
	,count(distinct case when is_first = 1 then uin else  null end)
from t
group by referer_type,cube(referer,path)