Convert SQL Inner Join Custom to Eloquent Laravel
Can I convert my custom SQL syntax into Eloquent Laravel, this is my SQL syntax:
SELECT a.* FROM krs a INNER JOIN (
SELECT kode_matakuliah, MAX(bobot) as bobot_max
FROM krs
WHERE nim = 133341043
GROUP BY kode_matakuliah
) b ON a.bobot = b.bobot_max AND a.kode_matakuliah = b.kode_matakuliah
WHERE nim = 133341043
from Laravel Questions and Answers https://laravelquestions.com/laravel/convert-sql-inner-join-custom-to-eloquent-laravel/
via Lzo Media
No comments:
Post a Comment