1 month ago

Convert SQL to Elequent

Posted 1 month ago by alamin899

how can i convert to elequent

select pay_sch.student_id, pay_sch.payment_head_class_id, pay_sch.ps_id, SUM(pay_sch.amount) total_payment_schedule_amount, SUM(pd.payable_amount) total_payable_amount, SUM(pd.exemption_amount) total_exemption_amount, SUM(pd.paid_amount) total_paid_amount from ( SELECT ps.payment_head_class_id, ps.student_id, ps_id, ps.amount FROM payment_schedules ps WHERE ps.student_id = 6 ) as pay_sch left join payment_details pd on pay_sch.ps_id = pd.payment_schedule_id

group by pay_sch.payment_head_class_id

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