| Sort (cost=30.05..30.06 rows=1 width=113) |
| Sort Key: scpcrd.remind_date DESC |
| -> Nested Loop Left Join (cost=4.88..30.04 rows=1 width=113) |
| Join Filter: (sc.project_id = t0.project_id) |
| -> Nested Loop (cost=0.00..5.98 rows=1 width=69) |
| Join Filter: (scpcrd.project_used_client_id = sc.id) |
| -> Seq Scan on tbl_project_used_clients sc (cost=0.00..4.86 rows=1 width=8) |
| Filter: (project_id = 4014) |
| -> Seq Scan on tbl_project_used_client_payment_collection_remind_dates scpcrd (cost=0.00..1.05 rows=5 width=65) |
| -> GroupAggregate (cost=4.88..21.86 rows=1 width=68) |
| Group Key: t0.project_id |
| -> Hash Right Join (cost=4.88..21.84 rows=2 width=36) |
| Hash Cond: (t1.project_used_client_id = t0.id) |
| -> Seq Scan on tbl_project_used_client_payments t1 (cost=0.00..15.50 rows=550 width=36) |
| -> Hash (cost=4.86..4.86 rows=1 width=8) |
| -> Seq Scan on tbl_project_used_clients t0 (cost=0.00..4.86 rows=1 width=8) |
| Filter: (project_id = 4014) |
| SubPlan 1 |
| -> Aggregate (cost=1.08..1.09 rows=1 width=8) |
| -> Seq Scan on tbl_project_used_client_payment_collection_remind_dates scpcrdsub (cost=0.00..1.07 rows=1 width=4) |
| Filter: ((remind_date <= scpcrd.remind_date) AND (project_used_client_id = scpcrd.project_used_client_id)) |
| SubPlan 2 |
| -> Aggregate (cost=1.08..1.09 rows=1 width=8) |
| -> Seq Scan on tbl_project_used_client_payment_collection_remind_dates scpcrdsub_1 (cost=0.00..1.07 rows=1 width=4) |
| Filter: ((remind_date <= scpcrd.remind_date) AND (project_used_client_id = scpcrd.project_used_client_id)) |