Dosmukhanbet
1 month ago
330
6
Laravel

Join with subquery with Laravel

Posted 1 month 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.