表1:web
1.經過group_concat函數和分組,查出每一個id推薦的人有哪些函數
select group_concat(u_name, u_id) as referce_name, p_id from webusers group by p_id
2.查出pid的namespa
select referce_name, u_name from (select group_concat(u_name, u_id) as referce_name, p_id from webusers group by p_id) a inner join webusers b where a.p_id = b.u_id;