product
и product_translate
id
) если такого перевода нет, то выбираем любой другойproduct_translate
:title
, 2 для description
ORDER BY
в подзапросах select ...
from product as p
join lateral (
select title, description from product_translate as pt
where pt.product_id = p.id order by language_id = ? limit 1
) on true
where ....