                                                                  QUERY PLAN                                                                  
----------------------------------------------------------------------------------------------------------------------------------------------
 Limit  (cost=1081241.69..1081241.94 rows=100 width=163)
   ->  Sort  (cost=1081241.69..1081571.73 rows=132016 width=163)
         Sort Key: ('store'::text), ('ss_customer_sk'::text), date_dim.d_year, date_dim.d_qoy, item.i_category
         ->  HashAggregate  (cost=1074545.93..1076196.13 rows=132016 width=163)
               Group Key: ('store'::text), ('ss_customer_sk'::text), date_dim.d_year, date_dim.d_qoy, item.i_category
               ->  Append  (cost=26911.91..1051443.20 rows=1320156 width=129)
                     ->  Hash Join  (cost=26911.91..563546.44 rows=1244449 width=129)
                           Hash Cond: (store_sales.ss_item_sk = item.i_item_sk)
                           ->  Hash Join  (cost=17652.91..551020.63 rows=1244449 width=18)
                                 Hash Cond: (store_sales.ss_sold_date_sk = date_dim.d_date_sk)
                                 ->  Bitmap Heap Scan on store_sales  (cost=14604.31..544549.56 rows=1303725 width=14)
                                       Recheck Cond: (ss_customer_sk IS NULL)
                                       ->  Bitmap Index Scan on store_sales_ss_customer_sk_idx  (cost=0.00..14278.38 rows=1303725 width=0)
                                             Index Cond: (ss_customer_sk IS NULL)
                                 ->  Hash  (cost=2135.49..2135.49 rows=73049 width=12)
                                       ->  Seq Scan on date_dim  (cost=0.00..2135.49 rows=73049 width=12)
                           ->  Hash  (cost=7984.00..7984.00 rows=102000 width=55)
                                 ->  Seq Scan on item  (cost=0.00..7984.00 rows=102000 width=55)
                     ->  Hash Join  (cost=12307.60..272050.86 rows=3118 width=129)
                           Hash Cond: (web_sales.ws_item_sk = item_1.i_item_sk)
                           ->  Hash Join  (cost=3048.60..262783.68 rows=3118 width=18)
                                 Hash Cond: (web_sales.ws_sold_date_sk = date_dim_1.d_date_sk)
                                 ->  Seq Scan on web_sales  (cost=0.00..259726.89 rows=3119 width=14)
                                       Filter: (ws_ship_hdemo_sk IS NULL)
                                 ->  Hash  (cost=2135.49..2135.49 rows=73049 width=12)
                                       ->  Seq Scan on date_dim date_dim_1  (cost=0.00..2135.49 rows=73049 width=12)
                           ->  Hash  (cost=7984.00..7984.00 rows=102000 width=55)
                                 ->  Seq Scan on item item_1  (cost=0.00..7984.00 rows=102000 width=55)
                     ->  Hash Join  (cost=13141.52..196043.56 rows=72589 width=129)
                           Hash Cond: (catalog_sales.cs_item_sk = item_2.i_item_sk)
                           ->  Hash Join  (cost=3882.52..186594.00 rows=72589 width=18)
                                 Hash Cond: (catalog_sales.cs_sold_date_sk = date_dim_2.d_date_sk)
                                 ->  Bitmap Heap Scan on catalog_sales  (cost=833.92..183353.85 rows=72966 width=14)
                                       Recheck Cond: (cs_bill_customer_sk IS NULL)
                                       ->  Bitmap Index Scan on catalog_sales_cs_bill_customer_sk_idx  (cost=0.00..815.68 rows=72966 width=0)
                                             Index Cond: (cs_bill_customer_sk IS NULL)
                                 ->  Hash  (cost=2135.49..2135.49 rows=73049 width=12)
                                       ->  Seq Scan on date_dim date_dim_2  (cost=0.00..2135.49 rows=73049 width=12)
                           ->  Hash  (cost=7984.00..7984.00 rows=102000 width=55)
                                 ->  Seq Scan on item item_2  (cost=0.00..7984.00 rows=102000 width=55)
(40 rows)

