                                                                               QUERY PLAN                                                                                
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 Limit  (cost=940757.89..940761.39 rows=100 width=145)
   ->  GroupAggregate  (cost=940757.89..940819.84 rows=1770 width=145)
         Group Key: item.i_item_id
         ->  Sort  (cost=940757.89..940762.31 rows=1770 width=36)
               Sort Key: item.i_item_id
               ->  Nested Loop  (cost=58106.19..940662.40 rows=1770 width=36)
                     ->  Nested Loop  (cost=58105.90..939536.08 rows=1770 width=23)
                           ->  Hash Join  (cost=58105.62..938988.94 rows=1855 width=27)
                                 Hash Cond: (store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk)
                                 ->  Hash Join  (cost=2322.65..882847.36 rows=136613 width=31)
                                       Hash Cond: (store_sales.ss_sold_date_sk = date_dim.d_date_sk)
                                       ->  Seq Scan on store_sales  (cost=0.00..804917.92 rows=28800992 width=35)
                                       ->  Hash  (cost=2318.11..2318.11 rows=363 width=4)
                                             ->  Seq Scan on date_dim  (cost=0.00..2318.11 rows=363 width=4)
                                                   Filter: (d_year = 2001)
                                 ->  Hash  (cost=55442.00..55442.00 rows=27278 width=4)
                                       ->  Seq Scan on customer_demographics  (cost=0.00..55442.00 rows=27278 width=4)
                                             Filter: ((cd_gender = 'M'::bpchar) AND (cd_marital_status = 'M'::bpchar) AND (cd_education_status = '4 yr Degree'::bpchar))
                           ->  Index Scan using promotion_pkey on promotion  (cost=0.27..0.30 rows=1 width=4)
                                 Index Cond: (p_promo_sk = store_sales.ss_promo_sk)
                                 Filter: ((p_channel_email = 'N'::bpchar) OR (p_channel_event = 'N'::bpchar))
                     ->  Index Scan using item_pkey on item  (cost=0.29..0.64 rows=1 width=21)
                           Index Cond: (i_item_sk = store_sales.ss_item_sk)
(23 rows)

