/* Origin (request): GET https://testtra.puntlandgov.org
   Query 9 - 2025-05-06 14:48:22 [108.8ms] */
select sum(`payment_amount`) as aggregate from `Payment` inner join `invoice_payment` on `invoice_payment`.`payment_id` = `payment`.`id` inner join `invoice` on `invoice_payment`.`invoice_id` = `invoice`.`id` inner join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` where `transaction`.`service_id` = 1 and `transaction`.`status` = 'END' and `payment_date` > '2025-05-05' and `Payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 11 - 2025-05-06 14:48:23 [277.45ms] */
select sum(`outstanding_balance`) as aggregate from `invoice` inner join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` where `transaction`.`service_id` = 1 and `invoice`.`invoice_amount` <> 0.00 and `due_date` < '2025-05-06' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 12 - 2025-05-06 14:48:24 [947.47ms] */
select sum(`outstanding_balance`) as aggregate from `invoice` inner join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` where `transaction`.`service_id` = 2 and `invoice`.`invoice_amount` <> 0.00 and `due_date` < '2025-05-06' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 9 - 2025-05-06 15:35:29 [127.12ms] */
select sum(`payment_amount`) as aggregate from `Payment` inner join `invoice_payment` on `invoice_payment`.`payment_id` = `payment`.`id` inner join `invoice` on `invoice_payment`.`invoice_id` = `invoice`.`id` inner join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` where `transaction`.`service_id` = 1 and `transaction`.`status` = 'END' and `payment_date` > '2025-05-05' and `Payment`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 11 - 2025-05-06 15:35:29 [278.28ms] */
select sum(`outstanding_balance`) as aggregate from `invoice` inner join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` where `transaction`.`service_id` = 1 and `invoice`.`invoice_amount` <> 0.00 and `due_date` < '2025-05-06' and `invoice`.`deleted_at` is null;
/*==================================================*/
/* Origin (request): GET https://testtra.puntlandgov.org
   Query 12 - 2025-05-06 15:35:30 [932.02ms] */
select sum(`outstanding_balance`) as aggregate from `invoice` inner join `transaction` on `invoice`.`transaction_id` = `transaction`.`id` where `transaction`.`service_id` = 2 and `invoice`.`invoice_amount` <> 0.00 and `due_date` < '2025-05-06' and `invoice`.`deleted_at` is null;
/*==================================================*/
