BEGIN; BEGIN EXPLAIN select sum(l_extendedprice * l_discount) as revenue from lineitem where l_shipdate >= date '1994-01-01' and l_shipdate < cast(date '1994-01-01' + interval '1 year' as date) and l_discount between 0.03 - 0.01 and 0.03 + 0.01 and l_quantity < 25; QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Finalize Aggregate (cost=1722445.23..1722445.24 rows=1 width=32) -> Gather (cost=1722445.00..1722445.21 rows=2 width=32) Workers Planned: 2 -> Partial Aggregate (cost=1721445.00..1721445.01 rows=1 width=32) -> Parallel Seq Scan on lineitem (cost=0.00..1718935.84 rows=501832 width=12) Filter: ((l_shipdate >= '1994-01-01'::date) AND (l_shipdate < '1995-01-01'::date) AND (l_discount >= 0.02) AND (l_discount <= 0.04) AND (l_quantity < '25'::numeric)) (6 rows) COMMIT; COMMIT