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

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

0

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

0

Sign in to participate in this thread!

Eventy

Your banner here too?

john5db john5db Joined 3 Mar 2015

Moderators

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

Your logo here?

Laravel.io

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

© 2024 Laravel.io - All rights reserved.