且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

为什么我的左外连接不起作用?

更新时间:2022-11-05 19:22:09

您所做的基本上是url_id组内的交叉连接:mr x上一个。您需要限制连接条件以获得正确的结果:

What you do there is basically cross join within url_id group: mr x prev. You need to restrict the join condition to get the correct result:
left outer join moz prev on mr.url_id = prev.url_id and prev.num = 2
where mr.num = 1