请帮助我理解SQL中的此查询

问题描述

| 我正在阅读SQL Antipatterns,发现此查询真的很难理解:
SELECT
    bp1.product_id,b1.date_reported AS latest,b1.bug_id 
FROM
    Bugs b1
    JOIN 
    BugsProducts bp1 ON (b1.bug_id = bp1.bug_id) 
    LEFT OUTER JOIN
    (
      Bugs AS b2
      JOIN 
      BugsProducts AS bp2 ON b2.bug_id = bp2.bug_id
    )
     ON bp1.product_id = bp2.product_id AND 
         (b1.date_reported < b2.date_reported OR b1.date_reported = b2.date_reported
          AND
          b1.bug_id < b2.bug_id
         )
WHERE
    b2.bug_id IS NULL;
请向我解释一下SQL专家。。谢谢!     

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)