                                                                                  QUERY PLAN                                                                                   
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 Limit  (cost=949015.67..949019.17 rows=100 width=145)
   ->  GroupAggregate  (cost=949015.67..949077.62 rows=1770 width=145)
         Group Key: item.i_item_id
         ->  Sort  (cost=949015.67..949020.10 rows=1770 width=36)
               Sort Key: item.i_item_id
               ->  Nested Loop  (cost=55783.84..948920.19 rows=1770 width=36)
                     ->  Nested Loop  (cost=55783.55..947793.87 rows=1770 width=23)
                           ->  Nested Loop  (cost=55783.28..947246.73 rows=1855 width=27)
                                 ->  Hash Join  (cost=55782.97..936303.65 rows=391099 width=31)
                                       Hash Cond: (store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk)
                                       ->  Seq Scan on store_sales  (cost=0.00..804917.92 rows=28800992 width=35)
                                       ->  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))
                                 ->  Result Cache  (cost=0.30..0.65 rows=1 width=4)
                                       Cache Key: store_sales.ss_sold_date_sk
                                       ->  Index Scan using date_dim_pkey on date_dim  (cost=0.29..0.64 rows=1 width=4)
                                             Index Cond: (d_date_sk = store_sales.ss_sold_date_sk)
                                             Filter: (d_year = 2001)
                           ->  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)
(24 rows)

