我只想知道如何将此查询转换为 laravel 雄辩的查询。
"SELECT * FROM vw_part_supplier
LEFT JOIN purchase_request_detail ON vw_part_supplier.part_supp_id = purchase_request_detail.prd_part_supp_id
WHERE (
part_status = 'ACTIVE'
AND part_supp_id not IN (SELECT prd_part_supp_id FROM purchase_request_detail WHERE prd_pr_id = $id)
AND part_supp_supplier_id = (SELECT pr_supplier_id FROM purchase_request WHERE pr_id = $id)
AND part_prod_grp_id = (SELECT pr_prod_grp_id FROM purchase_request WHERE pr_id = $id)
AND part_supp_ratio!=0)
ORDER BY part_name,part_code,part_subcode";
我已经完成了这部分,但只到了 where not IN。任何帮助肯定会受到赞赏。谢谢!