QUERY PLAN
Sort (cost=1.29..1.30 rows=4 width=169)
Sort Key: eip.wrote_date, eip.created_at
-> HashAggregate (cost=1.21..1.25 rows=4 width=169)
Group Key: eip.id
-> Seq Scan on tbl_erp_inventory_products eip (cost=0.00..1.20 rows=4 width=169)
Filter: ((inventory > '0'::numeric) AND (product_id = 2068))