extensions/spark/kyuubi-spark-connector-tpcds/src/main/resources/kyuubi/tpcds_3.2/q14a.sql [18:64]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
with cross_items as (
   select
      i_item_sk ss_item_sk
   from
      item,
      (
         select
            iss.i_brand_id brand_id,
            iss.i_class_id class_id,
            iss.i_category_id category_id
         from
            store_sales,
            item iss,
            date_dim d1
         where
            ss_item_sk = iss.i_item_sk
            and ss_sold_date_sk = d1.d_date_sk
            and d1.d_year between 1998
            AND 1998 + 2
         intersect
         select
            ics.i_brand_id,
            ics.i_class_id,
            ics.i_category_id
         from
            catalog_sales,
            item ics,
            date_dim d2
         where
            cs_item_sk = ics.i_item_sk
            and cs_sold_date_sk = d2.d_date_sk
            and d2.d_year between 1998
            AND 1998 + 2
         intersect
         select
            iws.i_brand_id,
            iws.i_class_id,
            iws.i_category_id
         from
            web_sales,
            item iws,
            date_dim d3
         where
            ws_item_sk = iws.i_item_sk
            and ws_sold_date_sk = d3.d_date_sk
            and d3.d_year between 1998
            AND 1998 + 2
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



extensions/spark/kyuubi-spark-connector-tpcds/src/main/resources/kyuubi/tpcds_3.2/q14b.sql [18:64]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
with cross_items as (
  select
    i_item_sk ss_item_sk
  from
    item,
    (
      select
        iss.i_brand_id brand_id,
        iss.i_class_id class_id,
        iss.i_category_id category_id
      from
        store_sales,
        item iss,
        date_dim d1
      where
        ss_item_sk = iss.i_item_sk
        and ss_sold_date_sk = d1.d_date_sk
        and d1.d_year between 1998
        AND 1998 + 2
      intersect
      select
        ics.i_brand_id,
        ics.i_class_id,
        ics.i_category_id
      from
        catalog_sales,
        item ics,
        date_dim d2
      where
        cs_item_sk = ics.i_item_sk
        and cs_sold_date_sk = d2.d_date_sk
        and d2.d_year between 1998
        AND 1998 + 2
      intersect
      select
        iws.i_brand_id,
        iws.i_class_id,
        iws.i_category_id
      from
        web_sales,
        item iws,
        date_dim d3
      where
        ws_item_sk = iws.i_item_sk
        and ws_sold_date_sk = d3.d_date_sk
        and d3.d_year between 1998
        AND 1998 + 2
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



