79796816

Date: 2025-10-22 13:25:15
Score: 0.5
Natty:
Report link

For MySQL 8.0.14+ you can also do this with LATERAL by using order and limit in the subquery.

SELECT CONCAT(title, ' ', forename, ' ', surname) AS name
FROM t_customer c,
LATERAL (
    SELECT title, forename, surname
    FROM t_customer_data
    WHERE customer_id = c.customer_id
    ORDER BY id DESC
    LIMIT 1
) d
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: alwaysmakingjava