QUERY PLAN
GroupAggregate (cost=488.19..695.00 rows=3 width=36)
Group Key: c.project_id
-> Hash Right Join (cost=488.19..694.95 rows=3 width=36)
Hash Cond: (tbl_case_assignments.case_id = c.id)
-> HashAggregate (cost=210.26..313.12 rows=8229 width=36)
Group Key: tbl_case_assignments.case_id
-> Seq Scan on tbl_case_assignments (cost=0.00..168.84 rows=8284 width=12)
-> Hash (cost=277.89..277.89 rows=3 width=8)
-> Seq Scan on tbl_cases c (cost=0.00..277.89 rows=3 width=8)
Filter: (project_id = 3957)