QUERY PLAN
GroupAggregate (cost=25.16..25.22 rows=2 width=318)
Group Key: pt.product_type_id, pt.name
-> Sort (cost=25.16..25.16 rows=2 width=318)
Sort Key: pt.product_type_id, pt.name
-> Hash Join (cost=12.49..25.15 rows=2 width=318)
Hash Cond: (pt.project_id = tbl_projects.id)
-> Seq Scan on tbl_project_product_types pt (cost=0.00..12.10 rows=210 width=322)
-> Hash (cost=12.47..12.47 rows=1 width=4)
-> Seq Scan on tbl_projects (cost=0.00..12.47 rows=1 width=4)
Filter: ((created_by = ANY ('{5493,5493}'::integer[])) AND (bargain_date >= '2026-01-01'::date) AND (bargain_date < '2027-01-01 00:00:00'::timestamp without time zone) AND (bargain_date >= '2026-01-01'::date) AND (bargain_date <= '2026-12-31'::date))