Oct 16, 2018
0
Level 1
Laravel query structure
Hi all, i have a query where i need to collect my agent's commission daily transaction,
select a.fullname , DATE_FORMAT(b.created_at, "%M %d %Y") as mydate, sum(c.commission) from agent a, job_orders b, service c
where a.id = b.therapist_fullname and
b.service = c.id group by a.fullname , mydate, c.commission
and i get this result with the format
| Agent Name | Friday | Saturday | etc etc
--------------------------------------------------------
| Agent 1 | 50 |
| Agent 1 | 100 |
and i want it something like this
| Agent Name | Friday | Saturday | etc etc
--------------------------------------------------------
| Agent 1 | 50 | 100 |
can anyone help me with this?.
Please or to participate in this conversation.