TakeOrderedAndProject [cnt,state]
  WholeStageCodegen (8)
    Filter [cnt]
      HashAggregate [ca_state,count] [count(1),state,cnt,count]
        InputAdapter
          Exchange [ca_state] #1
            WholeStageCodegen (7)
              HashAggregate [ca_state] [count,count]
                Project [ca_state]
                  BroadcastHashJoin [ss_item_sk,i_item_sk]
                    Project [ca_state,ss_item_sk]
                      BroadcastHashJoin [ss_sold_date_sk,d_date_sk]
                        Project [ca_state,ss_item_sk,ss_sold_date_sk]
                          BroadcastHashJoin [c_customer_sk,ss_customer_sk]
                            Project [ca_state,c_customer_sk]
                              BroadcastHashJoin [ca_address_sk,c_current_addr_sk]
                                Filter [ca_address_sk]
                                  ColumnarToRow
                                    InputAdapter
                                      Scan parquet spark_catalog.default.customer_address [ca_address_sk,ca_state]
                                InputAdapter
                                  BroadcastExchange #2
                                    WholeStageCodegen (1)
                                      Filter [c_current_addr_sk,c_customer_sk]
                                        ColumnarToRow
                                          InputAdapter
                                            Scan parquet spark_catalog.default.customer [c_customer_sk,c_current_addr_sk]
                            InputAdapter
                              BroadcastExchange #3
                                WholeStageCodegen (2)
                                  Filter [ss_customer_sk,ss_item_sk]
                                    ColumnarToRow
                                      InputAdapter
                                        Scan parquet spark_catalog.default.store_sales [ss_item_sk,ss_customer_sk,ss_sold_date_sk]
                                          SubqueryBroadcast [d_date_sk] #1
                                            BroadcastExchange #4
                                              WholeStageCodegen (1)
                                                Project [d_date_sk]
                                                  Filter [d_month_seq,d_date_sk]
                                                    ReusedSubquery [d_month_seq] #2
                                                    ColumnarToRow
                                                      InputAdapter
                                                        Scan parquet spark_catalog.default.date_dim [d_date_sk,d_month_seq]
                                                          Subquery #2
                                                            WholeStageCodegen (2)
                                                              HashAggregate [d_month_seq]
                                                                InputAdapter
                                                                  Exchange [d_month_seq] #5
                                                                    WholeStageCodegen (1)
                                                                      HashAggregate [d_month_seq]
                                                                        Project [d_month_seq]
                                                                          Filter [d_year,d_moy]
                                                                            ColumnarToRow
                                                                              InputAdapter
                                                                                Scan parquet spark_catalog.default.date_dim [d_month_seq,d_year,d_moy]
                        InputAdapter
                          ReusedExchange [d_date_sk] #4
                    InputAdapter
                      BroadcastExchange #6
                        WholeStageCodegen (6)
                          Project [i_item_sk]
                            BroadcastHashJoin [i_category,i_category,i_current_price,avg(i_current_price)]
                              Filter [i_current_price,i_category,i_item_sk]
                                ColumnarToRow
                                  InputAdapter
                                    Scan parquet spark_catalog.default.item [i_item_sk,i_current_price,i_category]
                              InputAdapter
                                BroadcastExchange #7
                                  WholeStageCodegen (5)
                                    Filter [avg(i_current_price)]
                                      HashAggregate [i_category,sum,count] [avg(UnscaledValue(i_current_price)),avg(i_current_price),sum,count]
                                        InputAdapter
                                          Exchange [i_category] #8
                                            WholeStageCodegen (4)
                                              HashAggregate [i_category,i_current_price] [sum,count,sum,count]
                                                Filter [i_category]
                                                  ColumnarToRow
                                                    InputAdapter
                                                      Scan parquet spark_catalog.default.item [i_current_price,i_category]
