select
a.pub_id,
a.group_name
from t_onlyou_wx_fans_label a where a.pub_id = '1BUSRGK7E0001AFCFEA90000BA352ED7';

select
distinct
a.pub_id,
array_to_string(array(SELECT b.group_name FROM t_onlyou_wx_fans_label b WHERE b.pub_id = a.pub_id), ',') as group_name
from t_onlyou_wx_fans_label a where a.pub_id = '1BUSRGK7E0001AFCFEA90000BA352ED7';

=============================
ORACLE: wm_concat
SELECT
other_colums,
wmsys.wm_concat (join_colum) as join_result
FROM table_name
GROUP BY other_colums
本文介绍了两种不同的SQL查询方法来获取特定公众号的所有标签名称。第一种方法使用标准的SQL选择语句来逐一列出标签;第二种方法则利用了数组操作函数将所有标签合并为一个字符串输出。这些技巧对于处理大量数据及进行数据整合时特别有用。
3万+

被折叠的 条评论
为什么被折叠?



