extensions/spark/kyuubi-spark-connector-tpcds/src/main/resources/kyuubi/tpcds_3.2/q14a.sql [66:112]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   where
      i_brand_id = brand_id
      and i_class_id = class_id
      and i_category_id = category_id
),
avg_sales as (
   select
      avg(quantity * list_price) average_sales
   from
      (
         select
            ss_quantity quantity,
            ss_list_price list_price
         from
            store_sales,
            date_dim
         where
            ss_sold_date_sk = d_date_sk
            and d_year between 1998
            and 1998 + 2
         union
         all
         select
            cs_quantity quantity,
            cs_list_price list_price
         from
            catalog_sales,
            date_dim
         where
            cs_sold_date_sk = d_date_sk
            and d_year between 1998
            and 1998 + 2
         union
         all
         select
            ws_quantity quantity,
            ws_list_price list_price
         from
            web_sales,
            date_dim
         where
            ws_sold_date_sk = d_date_sk
            and d_year between 1998
            and 1998 + 2
      ) x
)
select
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



extensions/spark/kyuubi-spark-connector-tpcds/src/main/resources/kyuubi/tpcds_3.2/q14b.sql [66:112]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  where
    i_brand_id = brand_id
    and i_class_id = class_id
    and i_category_id = category_id
),
avg_sales as (
  select
    avg(quantity * list_price) average_sales
  from
    (
      select
        ss_quantity quantity,
        ss_list_price list_price
      from
        store_sales,
        date_dim
      where
        ss_sold_date_sk = d_date_sk
        and d_year between 1998
        and 1998 + 2
      union
      all
      select
        cs_quantity quantity,
        cs_list_price list_price
      from
        catalog_sales,
        date_dim
      where
        cs_sold_date_sk = d_date_sk
        and d_year between 1998
        and 1998 + 2
      union
      all
      select
        ws_quantity quantity,
        ws_list_price list_price
      from
        web_sales,
        date_dim
      where
        ws_sold_date_sk = d_date_sk
        and d_year between 1998
        and 1998 + 2
    ) x
)
select
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



