select t1.user_id
from a t1
left join
b t2
on
t1.utm = t2.utm #先执行左链接
join c t3 on t2.id = t3.id; #然后再把左联的表和c表联查询
上下2种写法都是一样的
select * from (select t1.user_id from a t1 left join b t2 on t1.utm = t2.utm) as lucax
join c t3 on lucax.user_id = t3.id