TakeOrderedAndProject [cnt,state]
  WholeStageCodegen (14)
    Filter [cnt]
      HashAggregate [ca_state,count] [count(1),state,cnt,count]
        InputAdapter
          Exchange [ca_state] #1
            WholeStageCodegen (13)
              HashAggregate [ca_state] [count,count]
                Project [ca_state]
                  SortMergeJoin [ss_customer_sk,c_customer_sk]
                    InputAdapter
                      WholeStageCodegen (6)
                        Sort [ss_customer_sk]
                          InputAdapter
                            Exchange [ss_customer_sk] #2
                              WholeStageCodegen (5)
                                Project [ss_customer_sk]
                                  BroadcastHashJoin [ss_sold_date_sk,d_date_sk]
                                    Project [ss_customer_sk,ss_sold_date_sk]
                                      BroadcastHashJoin [i_item_sk,ss_item_sk]
                                        InputAdapter
                                          BroadcastExchange #3
                                            WholeStageCodegen (3)
                                              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 #4
                                                      WholeStageCodegen (2)
                                                        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] #5
                                                                WholeStageCodegen (1)
                                                                  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]
                                        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 #6
                                                    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] #7
                                                                          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] #6
                    InputAdapter
                      WholeStageCodegen (12)
                        Sort [c_customer_sk]
                          InputAdapter
                            Exchange [c_customer_sk] #8
                              WholeStageCodegen (11)
                                Project [ca_state,c_customer_sk]
                                  SortMergeJoin [ca_address_sk,c_current_addr_sk]
                                    InputAdapter
                                      WholeStageCodegen (8)
                                        Sort [ca_address_sk]
                                          InputAdapter
                                            Exchange [ca_address_sk] #9
                                              WholeStageCodegen (7)
                                                Filter [ca_address_sk]
                                                  ColumnarToRow
                                                    InputAdapter
                                                      Scan parquet spark_catalog.default.customer_address [ca_address_sk,ca_state]
                                    InputAdapter
                                      WholeStageCodegen (10)
                                        Sort [c_current_addr_sk]
                                          InputAdapter
                                            Exchange [c_current_addr_sk] #10
                                              WholeStageCodegen (9)
                                                Filter [c_current_addr_sk,c_customer_sk]
                                                  ColumnarToRow
                                                    InputAdapter
                                                      Scan parquet spark_catalog.default.customer [c_customer_sk,c_current_addr_sk]
