MySQL – left join on last (or first) record in the right table | Murray Hopkins' bits and pieces

MySQL – left join on last (or first) record in the right table | Murray Hopkins' bits and pieces

瀏覽:1215
日期:2025-05-05
I think the LIMIT statement in subquery will not depend on the main query. So result of ( SELECT s1.* FROM sales as s1 LEFT JOIN sales AS s2 ON s1.custID = s2.custID AND s1.saledate < s2.saledate WHERE s2.custID IS NULL LIMIT 1) will allways be the ......看更多