General
- split(a, '@')[1]: 下标从1开始
- 日期比较(带时分秒): end_time>substr(cast(now() as varchar),1,19)
array拼接
SELECT sku_cate_id
, array_join(array_agg(DISTINCT concat(CAST(attribute_name_id AS varchar), '|', attribute_value_name_id)), ',') AS attribute_value_name_ids
FROM dw.dw_pub_gds_attribute_pdc_td
GROUP BY sku_cate_id
;
网友评论