关于文献【26年ACL时间检验奖2】
2026/8/14 1:14:45
在Athena数据库中,使用json_extract_scalar函数对某个json字段进行过滤和分组统计。
SELECTJSON_EXTRACT_SCALAR(all_json,'$["properties"]["$latest_utm_medium"]')as"latest_utm_medium",COUNT(*)asrecord_countFROMgule_tableWHEREevent='$MPViewScreen'ANDJSON_EXTRACT_SCALAR(all_json,'$["properties"]["$url_path"]')='pages/thirdPartner/page'ANDJSON_EXTRACT_SCALAR(all_json,'$["properties"]["$url_query"]')LIKE'%id=%'AND"date">=DATE('2025-12-04')AND"date"<=DATE('2025-12-07')GROUPBYJSON_EXTRACT_SCALAR(all_json,'$["properties"]["$latest_utm_medium"]')ORDERBYrecord_countDESC;