2 ms·
You can use LIMIT in correlated subqueries in MySQL +8 using LATERAL https://dev.mysql.com/doc/refman/8.0/en/lateral-derived-tables.html https://dev.mysql.com/
by gavinray 4y ago
You can use LIMIT in correlated subqueries in MySQL +8 using LATERAL
https://dev.mysql.com/doc/refman/8.0/en/lateral-derived-tables.html https://dev.mysql.com/doc/refman/8.0/en/lateral-derived-tabl...
Prior to this you can emulate it with ROW NUMBER Window function in subquery, and this is what LATERAL gets turned into in many DB engines I believe
https://stackoverflow.com/questions/73127487/aws-athena-v2-prestodb-reference-left-hand-row-in-right-hand-subquery https://stackoverflow.com/questions/73127487/aws-athena-v2-p...