Dosmukhanbet
2 months ago
344
6
Laravel

Join with subquery with Laravel

Posted 2 months ago by Dosmukhanbet

Hello, I want to below mysql query run with laravel, can anybody help with it

select 
orders.*,
countries.shortname as a_point_country 
from orders
left join countries
on countries.id = (
	select country_id from points where id  =  orders.point_A_id
)

Please sign in or create an account to participate in this conversation.