JOIN LATERAL

JOIN LATERAL

menashemenashe Posts: 196Questions: 43Answers: 2

How can I implement JOIN LATERAL in Editor PHP?

FROM packaging_dimensions pdim
LEFT JOIN packaging_details pdet ON pdet.packaging_id = pdim.id
JOIN LATERAL (SELECT packaging_id, min(pr.price) OVER (PARTITION BY pdet.id) AS lowest_price
FROM prices pr
WHERE pr.packaging_id = pdet.id
LIMIT 1) AS lowest ON TRUE

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    Answer ✓

    No, sorry. Only a relatively simple left join is supported at this time. For something more complex like this, you woul dneed to use a VIEW.

    Allan

Sign In or Register to comment.