QUERY PLAN
GroupAggregate (cost=38.56..43.62 rows=1 width=36)
Group Key: c.project_id
-> Hash Right Join (cost=38.56..43.60 rows=1 width=36)
Hash Cond: (tbl_case_assignments.case_id = c.id)
-> HashAggregate (cost=25.30..27.80 rows=200 width=36)
Group Key: tbl_case_assignments.case_id
-> Seq Scan on tbl_case_assignments (cost=0.00..20.20 rows=1020 width=12)
-> Hash (cost=13.25..13.25 rows=1 width=8)
-> Seq Scan on tbl_cases c (cost=0.00..13.25 rows=1 width=8)
Filter: (project_id = 1)