QUERY PLAN
GroupAggregate (cost=162.49..163.23 rows=37 width=133)
Group Key: sip.id
-> Sort (cost=162.49..162.59 rows=37 width=104)
Sort Key: sip.id
-> Hash Right Join (cost=41.96..161.53 rows=37 width=104)
Hash Cond: ((lower((ip.title)::text) = lower((sip.title)::text)) AND (lower(ip.description) = lower(sip.description)))
-> Seq Scan on tbl_inventory_products ip (cost=0.00..56.90 rows=1790 width=61)
-> Hash (cost=41.41..41.41 rows=37 width=101)
-> Seq Scan on tbl_sales_invoice_products sip (cost=0.00..41.41 rows=37 width=101)
Filter: (sales_invoice_id = ANY ('{2117,2116,2115,2114,2113,2112,2111,2110,2109,2108,2107,2106,2105,2104,2102,2101,2100,2099,2098,2097}'::integer[]))