想了半天,这个场景可能是要某个用户的关注/被关注用户列表,再分析这些用户所有关系对应指标和 大家看看这样行不行😂 1. select distinct(case when uid1=1 then uid2 when uid2=1 then uid1 else null end) as cor_id from 原始表,这个表记成cor_table 2. select cor_table.cor_id, sum(原始表.value) from 原始表, cor_table where cor_table.cor_id=原始表.uid1&nbs***bsp;cor_table.cor_id=原始表.uid2 group by cor_table.cor_id