Support the ongoing development of →
Database Eloquent Installation
Last updated 2 years ago.

select iq.*, (iq.TotalUsers-iq.present) as absence ( select a.Department, count(id) as TotalUsers (select count(user_id) from attendance, users where and users.department=a.department group by department) as present, from users a group by a.Department) iq


You can use db::select(db::table($query)) where query is your query string. It returns a query builder Thanks


Sign in to participate in this thread!


Your banner here too?

john5db john5db Joined 3 Mar 2015


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.