                                                          QUERY PLAN                                                           
-------------------------------------------------------------------------------------------------------------------------------
 Limit  (cost=128546.87..128547.12 rows=100 width=91)
   ->  Sort  (cost=128546.87..128551.94 rows=2028 width=91)
         Sort Key: dt.d_year, (sum(store_sales.ss_net_profit)) DESC, item.i_brand_id
         ->  GroupAggregate  (cost=128418.66..128469.36 rows=2028 width=91)
               Group Key: dt.d_year, item.i_brand, item.i_brand_id
               ->  Sort  (cost=128418.66..128423.73 rows=2028 width=65)
                     Sort Key: dt.d_year, item.i_brand, item.i_brand_id
                     ->  Hash Join  (cost=2402.39..128307.27 rows=2028 width=65)
                           Hash Cond: (store_sales.ss_sold_date_sk = dt.d_date_sk)
                           ->  Nested Loop  (cost=7.09..125846.00 rows=25130 width=65)
                                 ->  Seq Scan on item  (cost=0.00..8239.00 rows=89 width=59)
                                       Filter: (i_manufact_id = 445)
                                 ->  Bitmap Heap Scan on store_sales  (cost=7.09..1318.01 rows=342 width=14)
                                       Recheck Cond: (ss_item_sk = item.i_item_sk)
                                       ->  Bitmap Index Scan on store_sales_ss_item_sk_idx  (cost=0.00..7.00 rows=342 width=0)
                                             Index Cond: (ss_item_sk = item.i_item_sk)
                           ->  Hash  (cost=2318.11..2318.11 rows=6175 width=8)
                                 ->  Seq Scan on date_dim dt  (cost=0.00..2318.11 rows=6175 width=8)
                                       Filter: (d_moy = 12)
(19 rows)

