                                                                        QUERY PLAN                                                                         
-----------------------------------------------------------------------------------------------------------------------------------------------------------
 Limit  (cost=289389.07..289389.07 rows=1 width=32)
   ->  Sort  (cost=289389.07..289389.07 rows=1 width=32)
         Sort Key: (sum(web_sales.ws_ext_discount_amt))
         ->  Aggregate  (cost=289389.05..289389.06 rows=1 width=32)
               ->  Hash Join  (cost=10742.03..289389.04 rows=3 width=6)
                     Hash Cond: (web_sales.ws_item_sk = item.i_item_sk)
                     Join Filter: (web_sales.ws_ext_discount_amt > (SubPlan 1))
                     ->  Hash Join  (cost=2501.92..281124.36 rows=9357 width=10)
                           Hash Cond: (web_sales.ws_sold_date_sk = date_dim.d_date_sk)
                           ->  Seq Scan on web_sales  (cost=0.00..259726.89 rows=7197889 width=14)
                           ->  Hash  (cost=2500.73..2500.73 rows=95 width=4)
                                 ->  Seq Scan on date_dim  (cost=0.00..2500.73 rows=95 width=4)
                                       Filter: ((d_date >= '2001-01-25'::date) AND (d_date <= '2001-04-25 00:00:00'::timestamp without time zone))
                     ->  Hash  (cost=8239.00..8239.00 rows=89 width=4)
                           ->  Seq Scan on item  (cost=0.00..8239.00 rows=89 width=4)
                                 Filter: (i_manufact_id = 914)
                     SubPlan 1
                       ->  Aggregate  (cost=979.02..979.03 rows=1 width=32)
                             ->  Nested Loop  (cost=5.40..979.01 rows=1 width=6)
                                   ->  Bitmap Heap Scan on web_sales web_sales_1  (cost=5.10..344.65 rows=86 width=10)
                                         Recheck Cond: (ws_item_sk = item.i_item_sk)
                                         ->  Bitmap Index Scan on web_sales_pkey  (cost=0.00..5.08 rows=86 width=0)
                                               Index Cond: (ws_item_sk = item.i_item_sk)
                                   ->  Result Cache  (cost=0.30..7.53 rows=1 width=4)
                                         Cache Key: web_sales_1.ws_sold_date_sk
                                         ->  Index Scan using date_dim_pkey on date_dim date_dim_1  (cost=0.29..7.52 rows=1 width=4)
                                               Index Cond: (d_date_sk = web_sales_1.ws_sold_date_sk)
                                               Filter: ((d_date >= '2001-01-25'::date) AND (d_date <= '2001-04-25 00:00:00'::timestamp without time zone))
(28 rows)

