Args(configFilePath=jdbc_client/odps_config.ini, globalSettingFile=jdbc_client/setting.properties, indexFilePath=/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/index_file_2, outputDir=/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/stream_2)
FileNameList:
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query1.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query2.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query3.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query4.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query5.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query6.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query7.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query8.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query9.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query10.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query11.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query12.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query13.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query14.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query15.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query16.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query17.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query18.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query19.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query20.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query21.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query22.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query23.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query24.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query25.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query26.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query27.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query28.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query29.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query30.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query31.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query32.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query33.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query34.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query35.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query36.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query37.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query38.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query39.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query40.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query41.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query42.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query43.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query44.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query45.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query46.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query47.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query48.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query49.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query50.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query51.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query52.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query53.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query54.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query55.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query56.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query57.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query58.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query59.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query60.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query61.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query62.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query63.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query64.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query65.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query66.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query67.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query68.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query69.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query70.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query71.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query72.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query73.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query74.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query75.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query76.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query77.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query78.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query79.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query80.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query81.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query82.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query83.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query84.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query85.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query86.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query87.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query88.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query89.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query90.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query91.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query92.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query93.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query94.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query95.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query96.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query97.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query98.sql
/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query99.sql
JdbcUrl: jdbc:odps:http://service.cn-shanghai.maxcompute.aliyun.com/api?skipCheckIfSelect=true&charset=UTF-8&interactiveMode=true&async=true&disableConnectionSetting=true
SLF4J(W): No SLF4J providers were found.
SLF4J(W): Defaulting to no-operation (NOP) logger implementation
SLF4J(W): See https://www.slf4j.org/codes.html#noProviders for further details.
SLF4J(W): Class path contains SLF4J bindings targeting slf4j-api versions 1.7.x or earlier.
SLF4J(W): Ignoring binding found at [jar:file:/apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/jdbc_client/benchmark-client-1.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J(W): See https://www.slf4j.org/codes.html#ignoredBindings for an explanation.
fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query1.sql
SQL:
-- start query 1 in stream 2 using template query56.tpl
with ss as (
 select i_item_id,sum(ss_ext_sales_price) total_sales
 from
 	store_sales,
 	date_dim,
         customer_address,
         item
 where i_item_id in (select
     i_item_id
from item
where i_color in ('seashell','chocolate','mint'))
 and     ss_item_sk              = i_item_sk
 and     ss_sold_date_sk         = d_date_sk
 and     d_year                  = 2002
 and     d_moy                   = 4
 and     ss_addr_sk              = ca_address_sk
 and     ca_gmt_offset           = -7 
 group by i_item_id),
 cs as (
 select i_item_id,sum(cs_ext_sales_price) total_sales
 from
 	catalog_sales,
 	date_dim,
         customer_address,
         item
 where
         i_item_id               in (select
  i_item_id
from item
where i_color in ('seashell','chocolate','mint'))
 and     cs_item_sk              = i_item_sk
 and     cs_sold_date_sk         = d_date_sk
 and     d_year                  = 2002
 and     d_moy                   = 4
 and     cs_bill_addr_sk         = ca_address_sk
 and     ca_gmt_offset           = -7 
 group by i_item_id),
 ws as (
 select i_item_id,sum(ws_ext_sales_price) total_sales
 from
 	web_sales,
 	date_dim,
         customer_address,
         item
 where
         i_item_id               in (select
  i_item_id
from item
where i_color in ('seashell','chocolate','mint'))
 and     ws_item_sk              = i_item_sk
 and     ws_sold_date_sk         = d_date_sk
 and     d_year                  = 2002
 and     d_moy                   = 4
 and     ws_bill_addr_sk         = ca_address_sk
 and     ca_gmt_offset           = -7
 group by i_item_id)
  select  i_item_id ,sum(total_sales) total_sales
 from  (select * from ss 
        union all
        select * from cs 
        union all
        select * from ws) tmp1
 group by i_item_id
 order by total_sales,
          i_item_id
 limit 100;

-- end query 1 in stream 2 using template query56.tpl

Index :1
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803204023056g99a3aiihpo_mcqa&token=cWYwdDJZd0hRZFEwT1BGMlZIbFhHODJCaWJjPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NDQyOCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDQwMjMwNTZnOTlhM2FpaWhwb19tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:40:22.982
endtime:2026-08-04 04:40:37.377
Cost time : 14395 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query2.sql
SQL:
-- start query 2 in stream 2 using template query98.tpl
select i_item_id
      ,i_item_desc 
      ,i_category 
      ,i_class 
      ,i_current_price
      ,sum(ss_ext_sales_price) as itemrevenue 
      ,sum(ss_ext_sales_price)*100/sum(sum(ss_ext_sales_price)) over
          (partition by i_class) as revenueratio
from	
	store_sales
    	,item 
    	,date_dim
where 
	ss_item_sk = i_item_sk 
  	and i_category in ('Music', 'Books', 'Electronics')
  	and ss_sold_date_sk = d_date_sk
	and d_date between cast('2001-04-22' as date) 
				and (cast('2001-04-22' as date) + INTERVAL '30' DAY)
group by 
	i_item_id
        ,i_item_desc 
        ,i_category
        ,i_class
        ,i_current_price
order by 
	i_category
        ,i_class
        ,i_item_id
        ,i_item_desc
        ,revenueratio;

-- end query 2 in stream 2 using template query98.tpl

Index :2
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803204037417g99a3aiihpt_mcqa&token=aTlSSTFCQzdzcWZqbjJUaHlyd3U0bVlOYVZrPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NDQ0Mix7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDQwMzc0MTdnOTlhM2FpaWhwdF9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:40:37.378
endtime:2026-08-04 04:40:50.849
Cost time : 13471 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query3.sql
SQL:
-- start query 3 in stream 2 using template query59.tpl
with wss as 
 (select d_week_seq,
        ss_store_sk,
        sum(case when (d_day_name='Sunday') then ss_sales_price else null end) sun_sales,
        sum(case when (d_day_name='Monday') then ss_sales_price else null end) mon_sales,
        sum(case when (d_day_name='Tuesday') then ss_sales_price else  null end) tue_sales,
        sum(case when (d_day_name='Wednesday') then ss_sales_price else null end) wed_sales,
        sum(case when (d_day_name='Thursday') then ss_sales_price else null end) thu_sales,
        sum(case when (d_day_name='Friday') then ss_sales_price else null end) fri_sales,
        sum(case when (d_day_name='Saturday') then ss_sales_price else null end) sat_sales
 from store_sales,date_dim
 where d_date_sk = ss_sold_date_sk
 group by d_week_seq,ss_store_sk
 )
  select  s_store_name1,s_store_id1,d_week_seq1
       ,sun_sales1/sun_sales2,mon_sales1/mon_sales2
       ,tue_sales1/tue_sales2,wed_sales1/wed_sales2,thu_sales1/thu_sales2
       ,fri_sales1/fri_sales2,sat_sales1/sat_sales2
 from
 (select s_store_name s_store_name1,wss.d_week_seq d_week_seq1
        ,s_store_id s_store_id1,sun_sales sun_sales1
        ,mon_sales mon_sales1,tue_sales tue_sales1
        ,wed_sales wed_sales1,thu_sales thu_sales1
        ,fri_sales fri_sales1,sat_sales sat_sales1
  from wss,store,date_dim d
  where d.d_week_seq = wss.d_week_seq and
        ss_store_sk = s_store_sk and 
        d_month_seq between 1176 and 1176 + 11) y,
 (select s_store_name s_store_name2,wss.d_week_seq d_week_seq2
        ,s_store_id s_store_id2,sun_sales sun_sales2
        ,mon_sales mon_sales2,tue_sales tue_sales2
        ,wed_sales wed_sales2,thu_sales thu_sales2
        ,fri_sales fri_sales2,sat_sales sat_sales2
  from wss,store,date_dim d
  where d.d_week_seq = wss.d_week_seq and
        ss_store_sk = s_store_sk and 
        d_month_seq between 1176+ 12 and 1176 + 23) x
 where s_store_id1=s_store_id2
   and d_week_seq1=d_week_seq2-52
 order by s_store_name1,s_store_id1,d_week_seq1
limit 100;

-- end query 3 in stream 2 using template query59.tpl

Index :3
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803204050889g99a3aiihpz_mcqa&token=VTdzY1dBaGd1TUN1cC9mK3JObXVNdDgxNDh3PSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NDQ1NSx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDQwNTA4ODlnOTlhM2FpaWhwel9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:40:50.850
endtime:2026-08-04 04:41:19.156
Cost time : 28306 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query4.sql
SQL:
-- start query 4 in stream 2 using template query24.tpl
with ssales as
(select c_last_name
      ,c_first_name
      ,s_store_name
      ,ca_state
      ,s_state
      ,i_color
      ,i_current_price
      ,i_manager_id
      ,i_units
      ,i_size
      ,sum(ss_net_paid_inc_tax) netpaid
from store_sales
    ,store_returns
    ,store
    ,item
    ,customer
    ,customer_address
where ss_ticket_number = sr_ticket_number
  and ss_item_sk = sr_item_sk
  and ss_customer_sk = c_customer_sk
  and ss_item_sk = i_item_sk
  and ss_store_sk = s_store_sk
  and c_current_addr_sk = ca_address_sk
  and c_birth_country <> upper(ca_country)
  and s_zip = ca_zip
and s_market_id=9
group by c_last_name
        ,c_first_name
        ,s_store_name
        ,ca_state
        ,s_state
        ,i_color
        ,i_current_price
        ,i_manager_id
        ,i_units
        ,i_size)
select c_last_name
      ,c_first_name
      ,s_store_name
      ,sum(netpaid) paid
from ssales
where i_color = 'navajo'
group by c_last_name
        ,c_first_name
        ,s_store_name
having sum(netpaid) > (select 0.05*avg(netpaid)
                                 from ssales)
order by c_last_name
        ,c_first_name
        ,s_store_name
;
with ssales as
(select c_last_name
      ,c_first_name
      ,s_store_name
      ,ca_state
      ,s_state
      ,i_color
      ,i_current_price
      ,i_manager_id
      ,i_units
      ,i_size
      ,sum(ss_net_paid_inc_tax) netpaid
from store_sales
    ,store_returns
    ,store
    ,item
    ,customer
    ,customer_address
where ss_ticket_number = sr_ticket_number
  and ss_item_sk = sr_item_sk
  and ss_customer_sk = c_customer_sk
  and ss_item_sk = i_item_sk
  and ss_store_sk = s_store_sk
  and c_current_addr_sk = ca_address_sk
  and c_birth_country <> upper(ca_country)
  and s_zip = ca_zip
  and s_market_id = 9
group by c_last_name
        ,c_first_name
        ,s_store_name
        ,ca_state
        ,s_state
        ,i_color
        ,i_current_price
        ,i_manager_id
        ,i_units
        ,i_size)
select c_last_name
      ,c_first_name
      ,s_store_name
      ,sum(netpaid) paid
from ssales
where i_color = 'violet'
group by c_last_name
        ,c_first_name
        ,s_store_name
having sum(netpaid) > (select 0.05*avg(netpaid)
                           from ssales)
order by c_last_name
        ,c_first_name
        ,s_store_name
;

-- end query 4 in stream 2 using template query24.tpl

Index :4
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803204119197g99a3aiihq3_mcqa&token=bXd6dC9hcW1xY1VKTDExMzVLTFRRamRzdkxjPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NDQ4NCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDQxMTkxOTdnOTlhM2FpaWhxM19tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:41:19.157
endtime:2026-08-04 04:42:07.798
Cost time : 48641 ms

Index :5
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803204207835g99a3aiihqe_mcqa&token=U2lGalFRS0NTdDl0MVA2UnBrWEl6K3pmekhrPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NDUzMix7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDQyMDc4MzVnOTlhM2FpaWhxZV9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:42:07.799
endtime:2026-08-04 04:42:13.844
Cost time : 6045 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query5.sql
SQL:
-- start query 5 in stream 2 using template query88.tpl
select  *
from
 (select count(*) h8_30_to_9
 from store_sales, household_demographics , time_dim, store
 where ss_sold_time_sk = time_dim.t_time_sk   
     and ss_hdemo_sk = household_demographics.hd_demo_sk 
     and ss_store_sk = s_store_sk
     and time_dim.t_hour = 8
     and time_dim.t_minute >= 30
     and ((household_demographics.hd_dep_count = 4 and household_demographics.hd_vehicle_count<=4+2) or
          (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2) or
          (household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2)) 
     and store.s_store_name = 'ese') s1,
 (select count(*) h9_to_9_30 
 from store_sales, household_demographics , time_dim, store
 where ss_sold_time_sk = time_dim.t_time_sk
     and ss_hdemo_sk = household_demographics.hd_demo_sk
     and ss_store_sk = s_store_sk 
     and time_dim.t_hour = 9 
     and time_dim.t_minute < 30
     and ((household_demographics.hd_dep_count = 4 and household_demographics.hd_vehicle_count<=4+2) or
          (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2) or
          (household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2))
     and store.s_store_name = 'ese') s2,
 (select count(*) h9_30_to_10 
 from store_sales, household_demographics , time_dim, store
 where ss_sold_time_sk = time_dim.t_time_sk
     and ss_hdemo_sk = household_demographics.hd_demo_sk
     and ss_store_sk = s_store_sk
     and time_dim.t_hour = 9
     and time_dim.t_minute >= 30
     and ((household_demographics.hd_dep_count = 4 and household_demographics.hd_vehicle_count<=4+2) or
          (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2) or
          (household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2))
     and store.s_store_name = 'ese') s3,
 (select count(*) h10_to_10_30
 from store_sales, household_demographics , time_dim, store
 where ss_sold_time_sk = time_dim.t_time_sk
     and ss_hdemo_sk = household_demographics.hd_demo_sk
     and ss_store_sk = s_store_sk
     and time_dim.t_hour = 10 
     and time_dim.t_minute < 30
     and ((household_demographics.hd_dep_count = 4 and household_demographics.hd_vehicle_count<=4+2) or
          (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2) or
          (household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2))
     and store.s_store_name = 'ese') s4,
 (select count(*) h10_30_to_11
 from store_sales, household_demographics , time_dim, store
 where ss_sold_time_sk = time_dim.t_time_sk
     and ss_hdemo_sk = household_demographics.hd_demo_sk
     and ss_store_sk = s_store_sk
     and time_dim.t_hour = 10 
     and time_dim.t_minute >= 30
     and ((household_demographics.hd_dep_count = 4 and household_demographics.hd_vehicle_count<=4+2) or
          (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2) or
          (household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2))
     and store.s_store_name = 'ese') s5,
 (select count(*) h11_to_11_30
 from store_sales, household_demographics , time_dim, store
 where ss_sold_time_sk = time_dim.t_time_sk
     and ss_hdemo_sk = household_demographics.hd_demo_sk
     and ss_store_sk = s_store_sk 
     and time_dim.t_hour = 11
     and time_dim.t_minute < 30
     and ((household_demographics.hd_dep_count = 4 and household_demographics.hd_vehicle_count<=4+2) or
          (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2) or
          (household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2))
     and store.s_store_name = 'ese') s6,
 (select count(*) h11_30_to_12
 from store_sales, household_demographics , time_dim, store
 where ss_sold_time_sk = time_dim.t_time_sk
     and ss_hdemo_sk = household_demographics.hd_demo_sk
     and ss_store_sk = s_store_sk
     and time_dim.t_hour = 11
     and time_dim.t_minute >= 30
     and ((household_demographics.hd_dep_count = 4 and household_demographics.hd_vehicle_count<=4+2) or
          (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2) or
          (household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2))
     and store.s_store_name = 'ese') s7,
 (select count(*) h12_to_12_30
 from store_sales, household_demographics , time_dim, store
 where ss_sold_time_sk = time_dim.t_time_sk
     and ss_hdemo_sk = household_demographics.hd_demo_sk
     and ss_store_sk = s_store_sk
     and time_dim.t_hour = 12
     and time_dim.t_minute < 30
     and ((household_demographics.hd_dep_count = 4 and household_demographics.hd_vehicle_count<=4+2) or
          (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2) or
          (household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2))
     and store.s_store_name = 'ese') s8
;

-- end query 5 in stream 2 using template query88.tpl

Index :6
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803204213888g99a3aiihqh_mcqa&token=RWhDU085dVhYTTFDbWtsWjFza2RFS3VCMFU4PSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NDUzOCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDQyMTM4ODhnOTlhM2FpaWhxaF9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:42:13.845
endtime:2026-08-04 04:42:36.776
Cost time : 22931 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query6.sql
SQL:
-- start query 6 in stream 2 using template query2.tpl
with wscs as
 (select sold_date_sk
        ,sales_price
  from (select ws_sold_date_sk sold_date_sk
              ,ws_ext_sales_price sales_price
        from web_sales 
        union all
        select cs_sold_date_sk sold_date_sk
              ,cs_ext_sales_price sales_price
        from catalog_sales)),
 wswscs as 
 (select d_week_seq,
        sum(case when (d_day_name='Sunday') then sales_price else null end) sun_sales,
        sum(case when (d_day_name='Monday') then sales_price else null end) mon_sales,
        sum(case when (d_day_name='Tuesday') then sales_price else  null end) tue_sales,
        sum(case when (d_day_name='Wednesday') then sales_price else null end) wed_sales,
        sum(case when (d_day_name='Thursday') then sales_price else null end) thu_sales,
        sum(case when (d_day_name='Friday') then sales_price else null end) fri_sales,
        sum(case when (d_day_name='Saturday') then sales_price else null end) sat_sales
 from wscs
     ,date_dim
 where d_date_sk = sold_date_sk
 group by d_week_seq)
 select d_week_seq1
       ,round(sun_sales1/sun_sales2,2)
       ,round(mon_sales1/mon_sales2,2)
       ,round(tue_sales1/tue_sales2,2)
       ,round(wed_sales1/wed_sales2,2)
       ,round(thu_sales1/thu_sales2,2)
       ,round(fri_sales1/fri_sales2,2)
       ,round(sat_sales1/sat_sales2,2)
 from
 (select wswscs.d_week_seq d_week_seq1
        ,sun_sales sun_sales1
        ,mon_sales mon_sales1
        ,tue_sales tue_sales1
        ,wed_sales wed_sales1
        ,thu_sales thu_sales1
        ,fri_sales fri_sales1
        ,sat_sales sat_sales1
  from wswscs,date_dim 
  where date_dim.d_week_seq = wswscs.d_week_seq and
        d_year = 2001) y,
 (select wswscs.d_week_seq d_week_seq2
        ,sun_sales sun_sales2
        ,mon_sales mon_sales2
        ,tue_sales tue_sales2
        ,wed_sales wed_sales2
        ,thu_sales thu_sales2
        ,fri_sales fri_sales2
        ,sat_sales sat_sales2
  from wswscs
      ,date_dim 
  where date_dim.d_week_seq = wswscs.d_week_seq and
        d_year = 2001+1) z
 where d_week_seq1=d_week_seq2-53
 order by d_week_seq1;

-- end query 6 in stream 2 using template query2.tpl

Index :7
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803204236814g99a3aiihql_mcqa&token=b1BRSnRGdWl2V25IejdwVTJONEZGWithRjZBPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NDU2MSx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDQyMzY4MTRnOTlhM2FpaWhxbF9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:42:36.777
endtime:2026-08-04 04:43:01.159
Cost time : 24382 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query7.sql
SQL:
-- start query 7 in stream 2 using template query5.tpl
with ssr as
 (select s_store_id,
        sum(sales_price) as sales,
        sum(profit) as profit,
        sum(return_amt) as returns,
        sum(net_loss) as profit_loss
 from
  ( select  ss_store_sk as store_sk,
            ss_sold_date_sk  as date_sk,
            ss_ext_sales_price as sales_price,
            ss_net_profit as profit,
            cast(0 as decimal(7,2)) as return_amt,
            cast(0 as decimal(7,2)) as net_loss
    from store_sales
    union all
    select sr_store_sk as store_sk,
           sr_returned_date_sk as date_sk,
           cast(0 as decimal(7,2)) as sales_price,
           cast(0 as decimal(7,2)) as profit,
           sr_return_amt as return_amt,
           sr_net_loss as net_loss
    from store_returns
   ) salesreturns,
     date_dim,
     store
 where date_sk = d_date_sk
       and d_date between cast('1999-08-09' as date) 
                  and (cast('1999-08-09' as date) +  INTERVAL '14' DAY)
       and store_sk = s_store_sk
 group by s_store_id)
 ,
 csr as
 (select cp_catalog_page_id,
        sum(sales_price) as sales,
        sum(profit) as profit,
        sum(return_amt) as returns,
        sum(net_loss) as profit_loss
 from
  ( select  cs_catalog_page_sk as page_sk,
            cs_sold_date_sk  as date_sk,
            cs_ext_sales_price as sales_price,
            cs_net_profit as profit,
            cast(0 as decimal(7,2)) as return_amt,
            cast(0 as decimal(7,2)) as net_loss
    from catalog_sales
    union all
    select cr_catalog_page_sk as page_sk,
           cr_returned_date_sk as date_sk,
           cast(0 as decimal(7,2)) as sales_price,
           cast(0 as decimal(7,2)) as profit,
           cr_return_amount as return_amt,
           cr_net_loss as net_loss
    from catalog_returns
   ) salesreturns,
     date_dim,
     catalog_page
 where date_sk = d_date_sk
       and d_date between cast('1999-08-09' as date)
                  and (cast('1999-08-09' as date) +  INTERVAL '14' DAY)
       and page_sk = cp_catalog_page_sk
 group by cp_catalog_page_id)
 ,
 wsr as
 (select web_site_id,
        sum(sales_price) as sales,
        sum(profit) as profit,
        sum(return_amt) as returns,
        sum(net_loss) as profit_loss
 from
  ( select  ws_web_site_sk as wsr_web_site_sk,
            ws_sold_date_sk  as date_sk,
            ws_ext_sales_price as sales_price,
            ws_net_profit as profit,
            cast(0 as decimal(7,2)) as return_amt,
            cast(0 as decimal(7,2)) as net_loss
    from web_sales
    union all
    select ws_web_site_sk as wsr_web_site_sk,
           wr_returned_date_sk as date_sk,
           cast(0 as decimal(7,2)) as sales_price,
           cast(0 as decimal(7,2)) as profit,
           wr_return_amt as return_amt,
           wr_net_loss as net_loss
    from web_returns left outer join web_sales on
         ( wr_item_sk = ws_item_sk
           and wr_order_number = ws_order_number)
   ) salesreturns,
     date_dim,
     web_site
 where date_sk = d_date_sk
       and d_date between cast('1999-08-09' as date)
                  and (cast('1999-08-09' as date) +  INTERVAL '14' DAY)
       and wsr_web_site_sk = web_site_sk
 group by web_site_id)
  select  channel
        , id
        , sum(sales) as sales
        , sum(returns) as returns
        , sum(profit) as profit
 from 
 (select 'store channel' as channel
        , 'store' || s_store_id as id
        , sales
        , returns
        , (profit - profit_loss) as profit
 from   ssr
 union all
 select 'catalog channel' as channel
        , 'catalog_page' || cp_catalog_page_id as id
        , sales
        , returns
        , (profit - profit_loss) as profit
 from  csr
 union all
 select 'web channel' as channel
        , 'web_site' || web_site_id as id
        , sales
        , returns
        , (profit - profit_loss) as profit
 from   wsr
 ) x
 group by rollup (channel, id)
 order by channel
         ,id
 limit 100;

-- end query 7 in stream 2 using template query5.tpl

Index :8
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803204301198g99a3aiihqp_mcqa&token=VGc0VVNSNjdpazNhM1NBcTVYdlJRaExWOGdRPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NDU4Nix7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDQzMDExOThnOTlhM2FpaWhxcF9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:43:01.160
endtime:2026-08-04 04:43:17.000
Cost time : 15840 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query8.sql
SQL:
-- start query 8 in stream 2 using template query6.tpl
select  a.ca_state state, count(*) cnt
 from customer_address a
     ,customer c
     ,store_sales s
     ,date_dim d
     ,item i
 where       a.ca_address_sk = c.c_current_addr_sk
 	and c.c_customer_sk = s.ss_customer_sk
 	and s.ss_sold_date_sk = d.d_date_sk
 	and s.ss_item_sk = i.i_item_sk
 	and d.d_month_seq = 
 	     (select distinct (d_month_seq)
 	      from date_dim
               where d_year = 2001
 	        and d_moy = 6 )
 	and i.i_current_price > 1.2 * 
             (select avg(j.i_current_price) 
 	     from item j 
 	     where j.i_category = i.i_category)
 group by a.ca_state
 having count(*) >= 10
 order by cnt, a.ca_state 
 limit 100;

-- end query 8 in stream 2 using template query6.tpl

Index :9
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803204317039g99a3aiihqt_mcqa&token=eVlieWxhY3ZJZEhDV2ZGbjZ2dWJNK2E0aDBNPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NDYwMSx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDQzMTcwMzlnOTlhM2FpaWhxdF9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:43:17.000
endtime:2026-08-04 04:43:21.699
Cost time : 4699 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query9.sql
SQL:
-- start query 9 in stream 2 using template query27.tpl
select  i_item_id,
        s_state, grouping(s_state) g_state,
        avg(ss_quantity) agg1,
        avg(ss_list_price) agg2,
        avg(ss_coupon_amt) agg3,
        avg(ss_sales_price) agg4
 from store_sales, customer_demographics, date_dim, store, item
 where ss_sold_date_sk = d_date_sk and
       ss_item_sk = i_item_sk and
       ss_store_sk = s_store_sk and
       ss_cdemo_sk = cd_demo_sk and
       cd_gender = 'F' and
       cd_marital_status = 'W' and
       cd_education_status = 'College' and
       d_year = 2000 and
       s_state in ('GA','NJ', 'AL', 'WV', 'MN', 'SC')
 group by rollup (i_item_id, s_state)
 order by i_item_id
         ,s_state
 limit 100;

-- end query 9 in stream 2 using template query27.tpl

Index :10
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803204321733g99a3aiihqv_mcqa&token=TUE1VkZSd1RscGxJaGpSYjhzSk1kVEFuSUZnPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NDYwNix7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDQzMjE3MzNnOTlhM2FpaWhxdl9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:43:21.699
endtime:2026-08-04 04:43:29.041
Cost time : 7342 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query10.sql
SQL:
-- start query 10 in stream 2 using template query87.tpl
select count(*) 
from ((select distinct c_last_name, c_first_name, d_date
       from store_sales, date_dim, customer
       where store_sales.ss_sold_date_sk = date_dim.d_date_sk
         and store_sales.ss_customer_sk = customer.c_customer_sk
         and d_month_seq between 1209 and 1209+11)
       except
      (select distinct c_last_name, c_first_name, d_date
       from catalog_sales, date_dim, customer
       where catalog_sales.cs_sold_date_sk = date_dim.d_date_sk
         and catalog_sales.cs_bill_customer_sk = customer.c_customer_sk
         and d_month_seq between 1209 and 1209+11)
       except
      (select distinct c_last_name, c_first_name, d_date
       from web_sales, date_dim, customer
       where web_sales.ws_sold_date_sk = date_dim.d_date_sk
         and web_sales.ws_bill_customer_sk = customer.c_customer_sk
         and d_month_seq between 1209 and 1209+11)
) cool_cust
;

-- end query 10 in stream 2 using template query87.tpl

Index :11
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803204329081g99a3aiihqz_mcqa&token=WHRsSlRQaXFwemxoK2tIc3NtS3RmNkJDRko4PSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NDYxNCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDQzMjkwODFnOTlhM2FpaWhxel9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:43:29.042
endtime:2026-08-04 04:44:29.163
Cost time : 60121 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query11.sql
SQL:
-- start query 11 in stream 2 using template query90.tpl
select  cast(amc as decimal(15,4))/cast(pmc as decimal(15,4)) am_pm_ratio
 from ( select count(*) amc
       from web_sales, household_demographics , time_dim, web_page
       where ws_sold_time_sk = time_dim.t_time_sk
         and ws_ship_hdemo_sk = household_demographics.hd_demo_sk
         and ws_web_page_sk = web_page.wp_web_page_sk
         and time_dim.t_hour between 12 and 12+1
         and household_demographics.hd_dep_count = 4
         and web_page.wp_char_count between 5000 and 5200) at,
      ( select count(*) pmc
       from web_sales, household_demographics , time_dim, web_page
       where ws_sold_time_sk = time_dim.t_time_sk
         and ws_ship_hdemo_sk = household_demographics.hd_demo_sk
         and ws_web_page_sk = web_page.wp_web_page_sk
         and time_dim.t_hour between 18 and 18+1
         and household_demographics.hd_dep_count = 4
         and web_page.wp_char_count between 5000 and 5200) pt
 order by am_pm_ratio
 limit 100;

-- end query 11 in stream 2 using template query90.tpl

Index :12
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803204429196g99a3aiihr6_mcqa&token=am9ubXpMRStKWE9aWWpUMEVGS0NtWXJldGJvPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NDY3NCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDQ0MjkxOTZnOTlhM2FpaWhyNl9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:44:29.164
endtime:2026-08-04 04:45:11.765
Cost time : 42601 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query12.sql
SQL:
-- start query 12 in stream 2 using template query83.tpl
with sr_items as
 (select i_item_id item_id,
        sum(sr_return_quantity) sr_item_qty
 from store_returns,
      item,
      date_dim
 where sr_item_sk = i_item_sk
 and   d_date    in 
	(select d_date
	from date_dim
	where d_week_seq in 
		(select d_week_seq
		from date_dim
	  where d_date in ('1998-03-08','1998-08-27','1998-11-19')))
 and   sr_returned_date_sk   = d_date_sk
 group by i_item_id),
 cr_items as
 (select i_item_id item_id,
        sum(cr_return_quantity) cr_item_qty
 from catalog_returns,
      item,
      date_dim
 where cr_item_sk = i_item_sk
 and   d_date    in 
	(select d_date
	from date_dim
	where d_week_seq in 
		(select d_week_seq
		from date_dim
	  where d_date in ('1998-03-08','1998-08-27','1998-11-19')))
 and   cr_returned_date_sk   = d_date_sk
 group by i_item_id),
 wr_items as
 (select i_item_id item_id,
        sum(wr_return_quantity) wr_item_qty
 from web_returns,
      item,
      date_dim
 where wr_item_sk = i_item_sk
 and   d_date    in 
	(select d_date
	from date_dim
	where d_week_seq in 
		(select d_week_seq
		from date_dim
		where d_date in ('1998-03-08','1998-08-27','1998-11-19')))
 and   wr_returned_date_sk   = d_date_sk
 group by i_item_id)
  select  sr_items.item_id
       ,sr_item_qty
       ,sr_item_qty/(sr_item_qty+cr_item_qty+wr_item_qty)/3.0 * 100 sr_dev
       ,cr_item_qty
       ,cr_item_qty/(sr_item_qty+cr_item_qty+wr_item_qty)/3.0 * 100 cr_dev
       ,wr_item_qty
       ,wr_item_qty/(sr_item_qty+cr_item_qty+wr_item_qty)/3.0 * 100 wr_dev
       ,(sr_item_qty+cr_item_qty+wr_item_qty)/3.0 average
 from sr_items
     ,cr_items
     ,wr_items
 where sr_items.item_id=cr_items.item_id
   and sr_items.item_id=wr_items.item_id 
 order by sr_items.item_id
         ,sr_item_qty
 limit 100;

-- end query 12 in stream 2 using template query83.tpl

Index :13
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803204511820g99a3aiihr9_mcqa&token=SEx3Mm9RWUJzQXFDSWI1L0VWQTV4WEpVTmFFPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NDcxNix7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDQ1MTE4MjBnOTlhM2FpaWhyOV9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:45:11.766
endtime:2026-08-04 04:46:10.719
Cost time : 58953 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query13.sql
SQL:
-- start query 13 in stream 2 using template query91.tpl
select  
        cc_call_center_id Call_Center,
        cc_name Call_Center_Name,
        cc_manager Manager,
        sum(cr_net_loss) Returns_Loss
from
        call_center,
        catalog_returns,
        date_dim,
        customer,
        customer_address,
        customer_demographics,
        household_demographics
where
        cr_call_center_sk       = cc_call_center_sk
and     cr_returned_date_sk     = d_date_sk
and     cr_returning_customer_sk= c_customer_sk
and     cd_demo_sk              = c_current_cdemo_sk
and     hd_demo_sk              = c_current_hdemo_sk
and     ca_address_sk           = c_current_addr_sk
and     d_year                  = 2000 
and     d_moy                   = 12
and     ( (cd_marital_status       = 'M' and cd_education_status     = 'Unknown')
        or(cd_marital_status       = 'W' and cd_education_status     = 'Advanced Degree'))
and     hd_buy_potential like '5001-10000%'
and     ca_gmt_offset           = -6
group by cc_call_center_id,cc_name,cc_manager,cd_marital_status,cd_education_status
order by sum(cr_net_loss) desc;

-- end query 13 in stream 2 using template query91.tpl

Index :14
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803204610750g99a3aiihrb_mcqa&token=a1hiMHRKQXJGTHc3VWhreVR2RGN2ZERQOWJ3PSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NDc3NSx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDQ2MTA3NTBnOTlhM2FpaWhyYl9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:46:10.719
endtime:2026-08-04 04:46:22.869
Cost time : 12150 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query14.sql
SQL:
-- start query 14 in stream 2 using template query28.tpl
select  *
from (select avg(ss_list_price) B1_LP
            ,count(ss_list_price) B1_CNT
            ,count(distinct ss_list_price) B1_CNTD
      from store_sales
      where ss_quantity between 0 and 5
        and (ss_list_price between 78 and 78+10 
             or ss_coupon_amt between 2447 and 2447+1000
             or ss_wholesale_cost between 30 and 30+20)) B1,
     (select avg(ss_list_price) B2_LP
            ,count(ss_list_price) B2_CNT
            ,count(distinct ss_list_price) B2_CNTD
      from store_sales
      where ss_quantity between 6 and 10
        and (ss_list_price between 71 and 71+10
          or ss_coupon_amt between 2455 and 2455+1000
          or ss_wholesale_cost between 68 and 68+20)) B2,
     (select avg(ss_list_price) B3_LP
            ,count(ss_list_price) B3_CNT
            ,count(distinct ss_list_price) B3_CNTD
      from store_sales
      where ss_quantity between 11 and 15
        and (ss_list_price between 92 and 92+10
          or ss_coupon_amt between 16886 and 16886+1000
          or ss_wholesale_cost between 15 and 15+20)) B3,
     (select avg(ss_list_price) B4_LP
            ,count(ss_list_price) B4_CNT
            ,count(distinct ss_list_price) B4_CNTD
      from store_sales
      where ss_quantity between 16 and 20
        and (ss_list_price between 146 and 146+10
          or ss_coupon_amt between 2474 and 2474+1000
          or ss_wholesale_cost between 41 and 41+20)) B4,
     (select avg(ss_list_price) B5_LP
            ,count(ss_list_price) B5_CNT
            ,count(distinct ss_list_price) B5_CNTD
      from store_sales
      where ss_quantity between 21 and 25
        and (ss_list_price between 0 and 0+10
          or ss_coupon_amt between 4356 and 4356+1000
          or ss_wholesale_cost between 18 and 18+20)) B5,
     (select avg(ss_list_price) B6_LP
            ,count(ss_list_price) B6_CNT
            ,count(distinct ss_list_price) B6_CNTD
      from store_sales
      where ss_quantity between 26 and 30
        and (ss_list_price between 181 and 181+10
          or ss_coupon_amt between 8005 and 8005+1000
          or ss_wholesale_cost between 72 and 72+20)) B6
limit 100;

-- end query 14 in stream 2 using template query28.tpl

Index :15
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803204622904g99a3aiihrf_mcqa&token=R2hJL3gvVlR6TTc1OHhSdFRtY2hJbW5zSVQ4PSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NDc4OCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDQ2MjI5MDRnOTlhM2FpaWhyZl9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:46:22.869
endtime:2026-08-04 04:46:53.678
Cost time : 30809 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query15.sql
SQL:
-- start query 15 in stream 2 using template query68.tpl
select  c_last_name
       ,c_first_name
       ,ca_city
       ,bought_city
       ,ss_ticket_number
       ,extended_price
       ,extended_tax
       ,list_price
 from (select ss_ticket_number
             ,ss_customer_sk
             ,ca_city bought_city
             ,sum(ss_ext_sales_price) extended_price 
             ,sum(ss_ext_list_price) list_price
             ,sum(ss_ext_tax) extended_tax 
       from store_sales
           ,date_dim
           ,store
           ,household_demographics
           ,customer_address 
       where store_sales.ss_sold_date_sk = date_dim.d_date_sk
         and store_sales.ss_store_sk = store.s_store_sk  
        and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
        and store_sales.ss_addr_sk = customer_address.ca_address_sk
        and date_dim.d_dom between 1 and 2 
        and (household_demographics.hd_dep_count = 2 or
             household_demographics.hd_vehicle_count= 0)
        and date_dim.d_year in (1998,1998+1,1998+2)
        and store.s_city in ('Randolph','Middleton')
       group by ss_ticket_number
               ,ss_customer_sk
               ,ss_addr_sk,ca_city) dn
      ,customer
      ,customer_address current_addr
 where ss_customer_sk = c_customer_sk
   and customer.c_current_addr_sk = current_addr.ca_address_sk
   and current_addr.ca_city <> bought_city
 order by c_last_name
         ,ss_ticket_number
 limit 100;

-- end query 15 in stream 2 using template query68.tpl

Index :16
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803204653716g99a3aiihrm_mcqa&token=eitpNHdyZXVZZDdRYWN3QWZhMTRKb0ZGd004PSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NDgxOCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDQ2NTM3MTZnOTlhM2FpaWhybV9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:46:53.679
endtime:2026-08-04 04:47:12.914
Cost time : 19235 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query16.sql
SQL:
-- start query 16 in stream 2 using template query8.tpl
select  s_store_name
      ,sum(ss_net_profit)
 from store_sales
     ,date_dim
     ,store,
     (select ca_zip
     from (
      SELECT substr(ca_zip,1,5) ca_zip
      FROM customer_address
      WHERE substr(ca_zip,1,5) IN (
                          '62754','52238','26476','71382','31318','40133',
                          '79788','37453','29609','80094','14104',
                          '43346','59979','96264','78454','44979',
                          '13547','83605','50804','41288','65616',
                          '38681','65267','10454','65275','80092',
                          '21223','66896','72788','50675','52658',
                          '72087','90294','77742','50432','33343',
                          '83548','24169','54096','43952','18458',
                          '30627','90635','91028','31285','81414',
                          '75616','47065','21652','43198','42264',
                          '10811','97448','81578','67878','17769',
                          '37615','99034','32780','20887','21089',
                          '40430','67031','75609','83043','82559',
                          '78016','19791','91933','20088','79070',
                          '85270','74918','86244','32567','25920',
                          '96903','48008','62548','41025','87959',
                          '83736','25581','27946','85024','39539',
                          '12470','94688','23752','36820','83341',
                          '16444','21805','69461','21732','69801',
                          '57436','30491','66595','13397','44638',
                          '46671','81185','25527','62511','97602',
                          '92828','65093','66122','91077','21876',
                          '14025','85375','73251','56334','70532',
                          '80742','77054','83617','11028','21674',
                          '84339','34883','84124','53076','45140',
                          '78971','49760','36817','55073','81914',
                          '40722','47487','28522','14213','48950',
                          '72984','15144','74490','59654','77738',
                          '66863','44059','30176','79274','24297',
                          '90016','18044','89793','28822','20247',
                          '82336','93629','34719','27029','62860',
                          '52663','92374','45529','52216','80631',
                          '93947','26288','33122','23098','94692',
                          '28368','68210','55404','71682','90077',
                          '44995','13433','72691','41736','13208',
                          '39344','62279','35598','21019','89561',
                          '69324','46927','69143','34143','17161',
                          '53057','20455','71884','30963','33784',
                          '81052','19501','85843','18034','88067',
                          '19021','55762','81162','56723','65641',
                          '87211','11639','27145','51876','63213',
                          '69869','23268','32039','63574','59222',
                          '62766','55690','44130','18593','35551',
                          '31859','25282','64759','76452','75763',
                          '27109','34539','98407','56757','67631',
                          '73961','61522','60967','87838','35520',
                          '87263','53100','72985','16230','66662',
                          '84140','95518','79154','17266','55859',
                          '45454','22709','25270','12258','67980',
                          '16393','46665','47722','50526','29262',
                          '81120','51355','59091','59454','64206',
                          '46840','87186','38137','92975','72528',
                          '23388','40166','94242','74074','24815',
                          '41385','12905','67439','30277','78359',
                          '37409','78738','78466','18835','56993',
                          '26936','61510','84202','42330','88591',
                          '43549','75244','33016','81580','11987',
                          '12472','67205','42332','95989','17583',
                          '74280','19576','28409','80524','60146',
                          '78468','45573','72367','60232','74275',
                          '85597','53735','48475','79278','71492',
                          '22754','51707','36636','57753','92774',
                          '99574','12384','48532','75016','48801',
                          '45544','87635','98288','97814','83786',
                          '37390','32608','79403','27226','94482',
                          '75251','37557','74869','11712','56117',
                          '18276','61599','33936','24696','19995',
                          '62464','29913','31294','82188','56002',
                          '55975','63338','36537','29392','68004',
                          '44347','48612','25190','17618','32842',
                          '23153','25120','35019','72607','47582',
                          '85122','12098','12444','74019','31119',
                          '97659','75378','13098','38184','17414',
                          '97739','12054','19984','33942','57409',
                          '80913','47359','14434','11342','65585',
                          '26523','64667','64217','83622','82454',
                          '88886','51289','23652','49429','35123',
                          '34236','57644','37630','18284','82144',
                          '80526','69823','96488','17927','20027',
                          '23200','56597','92790','70842')
     intersect
      select ca_zip
      from (SELECT substr(ca_zip,1,5) ca_zip,count(*) cnt
            FROM customer_address, customer
            WHERE ca_address_sk = c_current_addr_sk and
                  c_preferred_cust_flag='Y'
            group by ca_zip
            having count(*) > 10)A1)A2) V1
 where ss_store_sk = s_store_sk
  and ss_sold_date_sk = d_date_sk
  and d_qoy = 1 and d_year = 2000
  and (substr(s_zip,1,2) = substr(V1.ca_zip,1,2))
 group by s_store_name
 order by s_store_name
 limit 100;

-- end query 16 in stream 2 using template query8.tpl

Index :17
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803204712964g99a3aiihrp_mcqa&token=SG0xVjZoQUN1bnJLZmk3bFFXVXdWVHJIdVMwPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NDgzOCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDQ3MTI5NjRnOTlhM2FpaWhycF9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:47:12.915
endtime:2026-08-04 04:47:27.861
Cost time : 14946 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query17.sql
SQL:
-- start query 17 in stream 2 using template query76.tpl
select  channel, col_name, d_year, d_qoy, i_category, COUNT(*) sales_cnt, SUM(ext_sales_price) sales_amt FROM (
        SELECT 'store' as channel, 'ss_promo_sk' col_name, d_year, d_qoy, i_category, ss_ext_sales_price ext_sales_price
         FROM store_sales, item, date_dim
         WHERE ss_promo_sk IS NULL
           AND ss_sold_date_sk=d_date_sk
           AND ss_item_sk=i_item_sk
        UNION ALL
        SELECT 'web' as channel, 'ws_bill_customer_sk' col_name, d_year, d_qoy, i_category, ws_ext_sales_price ext_sales_price
         FROM web_sales, item, date_dim
         WHERE ws_bill_customer_sk IS NULL
           AND ws_sold_date_sk=d_date_sk
           AND ws_item_sk=i_item_sk
        UNION ALL
        SELECT 'catalog' as channel, 'cs_warehouse_sk' col_name, d_year, d_qoy, i_category, cs_ext_sales_price ext_sales_price
         FROM catalog_sales, item, date_dim
         WHERE cs_warehouse_sk IS NULL
           AND cs_sold_date_sk=d_date_sk
           AND cs_item_sk=i_item_sk) foo
GROUP BY channel, col_name, d_year, d_qoy, i_category
ORDER BY channel, col_name, d_year, d_qoy, i_category
limit 100;

-- end query 17 in stream 2 using template query76.tpl

Index :18
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803204727895g99a3aiihrs_mcqa&token=Z09xc0FLRWFTck5qeDdvVHd0d2l5THZpdmY4PSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NDg1Mix7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDQ3Mjc4OTVnOTlhM2FpaWhyc19tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:47:27.862
endtime:2026-08-04 04:48:00.975
Cost time : 33113 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query18.sql
SQL:
-- start query 18 in stream 2 using template query75.tpl
WITH all_sales AS (
 SELECT d_year
       ,i_brand_id
       ,i_class_id
       ,i_category_id
       ,i_manufact_id
       ,SUM(sales_cnt) AS sales_cnt
       ,SUM(sales_amt) AS sales_amt
 FROM (SELECT d_year
             ,i_brand_id
             ,i_class_id
             ,i_category_id
             ,i_manufact_id
             ,cs_quantity - COALESCE(cr_return_quantity,0) AS sales_cnt
             ,cs_ext_sales_price - COALESCE(cr_return_amount,0.0) AS sales_amt
       FROM catalog_sales JOIN item ON i_item_sk=cs_item_sk
                          JOIN date_dim ON d_date_sk=cs_sold_date_sk
                          LEFT JOIN catalog_returns ON (cs_order_number=cr_order_number 
                                                    AND cs_item_sk=cr_item_sk)
       WHERE i_category='Women'
       UNION
       SELECT d_year
             ,i_brand_id
             ,i_class_id
             ,i_category_id
             ,i_manufact_id
             ,ss_quantity - COALESCE(sr_return_quantity,0) AS sales_cnt
             ,ss_ext_sales_price - COALESCE(sr_return_amt,0.0) AS sales_amt
       FROM store_sales JOIN item ON i_item_sk=ss_item_sk
                        JOIN date_dim ON d_date_sk=ss_sold_date_sk
                        LEFT JOIN store_returns ON (ss_ticket_number=sr_ticket_number 
                                                AND ss_item_sk=sr_item_sk)
       WHERE i_category='Women'
       UNION
       SELECT d_year
             ,i_brand_id
             ,i_class_id
             ,i_category_id
             ,i_manufact_id
             ,ws_quantity - COALESCE(wr_return_quantity,0) AS sales_cnt
             ,ws_ext_sales_price - COALESCE(wr_return_amt,0.0) AS sales_amt
       FROM web_sales JOIN item ON i_item_sk=ws_item_sk
                      JOIN date_dim ON d_date_sk=ws_sold_date_sk
                      LEFT JOIN web_returns ON (ws_order_number=wr_order_number 
                                            AND ws_item_sk=wr_item_sk)
       WHERE i_category='Women') sales_detail
 GROUP BY d_year, i_brand_id, i_class_id, i_category_id, i_manufact_id)
 SELECT  prev_yr.d_year AS prev_year
                          ,curr_yr.d_year AS year
                          ,curr_yr.i_brand_id
                          ,curr_yr.i_class_id
                          ,curr_yr.i_category_id
                          ,curr_yr.i_manufact_id
                          ,prev_yr.sales_cnt AS prev_yr_cnt
                          ,curr_yr.sales_cnt AS curr_yr_cnt
                          ,curr_yr.sales_cnt-prev_yr.sales_cnt AS sales_cnt_diff
                          ,curr_yr.sales_amt-prev_yr.sales_amt AS sales_amt_diff
 FROM all_sales curr_yr, all_sales prev_yr
 WHERE curr_yr.i_brand_id=prev_yr.i_brand_id
   AND curr_yr.i_class_id=prev_yr.i_class_id
   AND curr_yr.i_category_id=prev_yr.i_category_id
   AND curr_yr.i_manufact_id=prev_yr.i_manufact_id
   AND curr_yr.d_year=1999
   AND prev_yr.d_year=1999-1
   AND CAST(curr_yr.sales_cnt AS DECIMAL(17,2))/CAST(prev_yr.sales_cnt AS DECIMAL(17,2))<0.9
 ORDER BY sales_cnt_diff,sales_amt_diff
 limit 100;

-- end query 18 in stream 2 using template query75.tpl

Index :19
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803204801063g99a3aiihrw_mcqa&token=VTI2OEhSemR0TGhpbGUzNk45WmNGLzFqSDFnPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NDg4Nix7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDQ4MDEwNjNnOTlhM2FpaWhyd19tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:48:00.975
endtime:2026-08-04 04:48:47.456
Cost time : 46481 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query19.sql
SQL:
-- start query 19 in stream 2 using template query80.tpl
with ssr as
 (select  s_store_id as store_id,
          sum(ss_ext_sales_price) as sales,
          sum(coalesce(sr_return_amt, 0)) as returns,
          sum(ss_net_profit - coalesce(sr_net_loss, 0)) as profit
  from store_sales left outer join store_returns on
         (ss_item_sk = sr_item_sk and ss_ticket_number = sr_ticket_number),
     date_dim,
     store,
     item,
     promotion
 where ss_sold_date_sk = d_date_sk 
       and d_date between cast('2000-08-09' as date) 
                  and (cast('2000-08-09' as date) + INTERVAL '30' DAY)
       and ss_store_sk = s_store_sk
       and ss_item_sk = i_item_sk
       and i_current_price > 50
       and ss_promo_sk = p_promo_sk
       and p_channel_tv = 'N'
 group by s_store_id)
 ,
 csr as
 (select  cp_catalog_page_id as catalog_page_id,
          sum(cs_ext_sales_price) as sales,
          sum(coalesce(cr_return_amount, 0)) as returns,
          sum(cs_net_profit - coalesce(cr_net_loss, 0)) as profit
  from catalog_sales left outer join catalog_returns on
         (cs_item_sk = cr_item_sk and cs_order_number = cr_order_number),
     date_dim,
     catalog_page,
     item,
     promotion
 where cs_sold_date_sk = d_date_sk 
       and d_date between cast('2000-08-09' as date)
                  and (cast('2000-08-09' as date) + INTERVAL '30' DAY)
        and cs_catalog_page_sk = cp_catalog_page_sk
       and cs_item_sk = i_item_sk
       and i_current_price > 50
       and cs_promo_sk = p_promo_sk
       and p_channel_tv = 'N'
group by cp_catalog_page_id)
 ,
 wsr as
 (select  web_site_id,
          sum(ws_ext_sales_price) as sales,
          sum(coalesce(wr_return_amt, 0)) as returns,
          sum(ws_net_profit - coalesce(wr_net_loss, 0)) as profit
  from web_sales left outer join web_returns on
         (ws_item_sk = wr_item_sk and ws_order_number = wr_order_number),
     date_dim,
     web_site,
     item,
     promotion
 where ws_sold_date_sk = d_date_sk 
       and d_date between cast('2000-08-09' as date)
                  and (cast('2000-08-09' as date) + INTERVAL '30' DAY)
        and ws_web_site_sk = web_site_sk
       and ws_item_sk = i_item_sk
       and i_current_price > 50
       and ws_promo_sk = p_promo_sk
       and p_channel_tv = 'N'
group by web_site_id)
  select  channel
        , id
        , sum(sales) as sales
        , sum(returns) as returns
        , sum(profit) as profit
 from 
 (select 'store channel' as channel
        , 'store' || store_id as id
        , sales
        , returns
        , profit
 from   ssr
 union all
 select 'catalog channel' as channel
        , 'catalog_page' || catalog_page_id as id
        , sales
        , returns
        , profit
 from  csr
 union all
 select 'web channel' as channel
        , 'web_site' || web_site_id as id
        , sales
        , returns
        , profit
 from   wsr
 ) x
 group by rollup (channel, id)
 order by channel
         ,id
 limit 100;

-- end query 19 in stream 2 using template query80.tpl

Index :20
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803204847494g99a3aiihs5_mcqa&token=Ym1jTlZZUkNoOHFsWXRXT0ZUNGQycWs3NVBzPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NDkzMix7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDQ4NDc0OTRnOTlhM2FpaWhzNV9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:48:47.456
endtime:2026-08-04 04:49:22.640
Cost time : 35184 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query20.sql
SQL:
-- start query 20 in stream 2 using template query1.tpl
with customer_total_return as
(select sr_customer_sk as ctr_customer_sk
,sr_store_sk as ctr_store_sk
,sum(SR_RETURN_AMT) as ctr_total_return
from store_returns
,date_dim
where sr_returned_date_sk = d_date_sk
and d_year =2002
group by sr_customer_sk
,sr_store_sk)
 select  c_customer_id
from customer_total_return ctr1
,store
,customer
where ctr1.ctr_total_return > (select avg(ctr_total_return)*1.2
from customer_total_return ctr2
where ctr1.ctr_store_sk = ctr2.ctr_store_sk)
and s_store_sk = ctr1.ctr_store_sk
and s_state = 'VA'
and ctr1.ctr_customer_sk = c_customer_sk
order by c_customer_id
limit 100;

-- end query 20 in stream 2 using template query1.tpl

Index :21
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803204922675g99a3aiihs9_mcqa&token=SENOV0xlVWkrV3FxcU1QNEZid3paZ0RwMDI0PSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NDk2Nyx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDQ5MjI2NzVnOTlhM2FpaWhzOV9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:49:22.640
endtime:2026-08-04 04:49:31.210
Cost time : 8570 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query21.sql
SQL:
-- start query 21 in stream 2 using template query69.tpl
select  
  cd_gender,
  cd_marital_status,
  cd_education_status,
  count(*) cnt1,
  cd_purchase_estimate,
  count(*) cnt2,
  cd_credit_rating,
  count(*) cnt3
 from
  customer c,customer_address ca,customer_demographics
 where
  c.c_current_addr_sk = ca.ca_address_sk and
  ca_state in ('NY','CA','MS') and
  cd_demo_sk = c.c_current_cdemo_sk and 
  exists (select *
          from store_sales,date_dim
          where c.c_customer_sk = ss_customer_sk and
                ss_sold_date_sk = d_date_sk and
                d_year = 2004 and
                d_moy between 4 and 4+2) and
   (not exists (select *
            from web_sales,date_dim
            where c.c_customer_sk = ws_bill_customer_sk and
                  ws_sold_date_sk = d_date_sk and
                  d_year = 2004 and
                  d_moy between 4 and 4+2) and
    not exists (select * 
            from catalog_sales,date_dim
            where c.c_customer_sk = cs_ship_customer_sk and
                  cs_sold_date_sk = d_date_sk and
                  d_year = 2004 and
                  d_moy between 4 and 4+2))
 group by cd_gender,
          cd_marital_status,
          cd_education_status,
          cd_purchase_estimate,
          cd_credit_rating
 order by cd_gender,
          cd_marital_status,
          cd_education_status,
          cd_purchase_estimate,
          cd_credit_rating
 limit 100;

-- end query 21 in stream 2 using template query69.tpl

Index :22
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803204931242g99a3aiihsc_mcqa&token=MWhRMWZnNXdaZE9zbTdjWFdEYlpaRUJtS2ZBPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NDk3Nix7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDQ5MzEyNDJnOTlhM2FpaWhzY19tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:49:31.210
endtime:2026-08-04 04:49:58.192
Cost time : 26982 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query22.sql
SQL:
-- start query 22 in stream 2 using template query26.tpl
select  i_item_id, 
        avg(cs_quantity) agg1,
        avg(cs_list_price) agg2,
        avg(cs_coupon_amt) agg3,
        avg(cs_sales_price) agg4 
 from catalog_sales, customer_demographics, date_dim, item, promotion
 where cs_sold_date_sk = d_date_sk and
       cs_item_sk = i_item_sk and
       cs_bill_cdemo_sk = cd_demo_sk and
       cs_promo_sk = p_promo_sk and
       cd_gender = 'M' and 
       cd_marital_status = 'W' and
       cd_education_status = '4 yr Degree' and
       (p_channel_email = 'N' or p_channel_event = 'N') and
       d_year = 1998 
 group by i_item_id
 order by i_item_id
 limit 100;

-- end query 22 in stream 2 using template query26.tpl

Index :23
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803204958246g99a3aiihsf_mcqa&token=U2RnYk9haDU4eUlsTStka0NBaEkzZG9vcFVBPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTAwMyx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDQ5NTgyNDZnOTlhM2FpaWhzZl9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:49:58.192
endtime:2026-08-04 04:50:19.981
Cost time : 21789 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query23.sql
SQL:
-- start query 23 in stream 2 using template query11.tpl
with year_total as (
 select c_customer_id customer_id
       ,c_first_name customer_first_name
       ,c_last_name customer_last_name
       ,c_preferred_cust_flag customer_preferred_cust_flag
       ,c_birth_country customer_birth_country
       ,c_login customer_login
       ,c_email_address customer_email_address
       ,d_year dyear
       ,sum(ss_ext_list_price-ss_ext_discount_amt) year_total
       ,'s' sale_type
 from customer
     ,store_sales
     ,date_dim
 where c_customer_sk = ss_customer_sk
   and ss_sold_date_sk = d_date_sk
 group by c_customer_id
         ,c_first_name
         ,c_last_name
         ,c_preferred_cust_flag 
         ,c_birth_country
         ,c_login
         ,c_email_address
         ,d_year 
 union all
 select c_customer_id customer_id
       ,c_first_name customer_first_name
       ,c_last_name customer_last_name
       ,c_preferred_cust_flag customer_preferred_cust_flag
       ,c_birth_country customer_birth_country
       ,c_login customer_login
       ,c_email_address customer_email_address
       ,d_year dyear
       ,sum(ws_ext_list_price-ws_ext_discount_amt) year_total
       ,'w' sale_type
 from customer
     ,web_sales
     ,date_dim
 where c_customer_sk = ws_bill_customer_sk
   and ws_sold_date_sk = d_date_sk
 group by c_customer_id
         ,c_first_name
         ,c_last_name
         ,c_preferred_cust_flag 
         ,c_birth_country
         ,c_login
         ,c_email_address
         ,d_year
         )
  select  
                  t_s_secyear.customer_id
                 ,t_s_secyear.customer_first_name
                 ,t_s_secyear.customer_last_name
                 ,t_s_secyear.customer_birth_country
 from year_total t_s_firstyear
     ,year_total t_s_secyear
     ,year_total t_w_firstyear
     ,year_total t_w_secyear
 where t_s_secyear.customer_id = t_s_firstyear.customer_id
         and t_s_firstyear.customer_id = t_w_secyear.customer_id
         and t_s_firstyear.customer_id = t_w_firstyear.customer_id
         and t_s_firstyear.sale_type = 's'
         and t_w_firstyear.sale_type = 'w'
         and t_s_secyear.sale_type = 's'
         and t_w_secyear.sale_type = 'w'
         and t_s_firstyear.dyear = 2001
         and t_s_secyear.dyear = 2001+1
         and t_w_firstyear.dyear = 2001
         and t_w_secyear.dyear = 2001+1
         and t_s_firstyear.year_total > 0
         and t_w_firstyear.year_total > 0
         and case when t_w_firstyear.year_total > 0 then t_w_secyear.year_total / t_w_firstyear.year_total else 0.0 end
             > case when t_s_firstyear.year_total > 0 then t_s_secyear.year_total / t_s_firstyear.year_total else 0.0 end
 order by t_s_secyear.customer_id
         ,t_s_secyear.customer_first_name
         ,t_s_secyear.customer_last_name
         ,t_s_secyear.customer_birth_country
limit 100;

-- end query 23 in stream 2 using template query11.tpl

Index :24
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803205020015g99a3aiihsh_mcqa&token=NFpUS2JIZWt3VVlpL044L3hnaWxNay9KdkwwPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTAyNSx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDUwMjAwMTVnOTlhM2FpaWhzaF9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:50:19.982
endtime:2026-08-04 04:50:44.992
Cost time : 25010 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query24.sql
SQL:
-- start query 24 in stream 2 using template query17.tpl
select  i_item_id
       ,i_item_desc
       ,s_state
       ,count(ss_quantity) as store_sales_quantitycount
       ,avg(ss_quantity) as store_sales_quantityave
       ,stddev_samp(ss_quantity) as store_sales_quantitystdev
       ,stddev_samp(ss_quantity)/avg(ss_quantity) as store_sales_quantitycov
       ,count(sr_return_quantity) as store_returns_quantitycount
       ,avg(sr_return_quantity) as store_returns_quantityave
       ,stddev_samp(sr_return_quantity) as store_returns_quantitystdev
       ,stddev_samp(sr_return_quantity)/avg(sr_return_quantity) as store_returns_quantitycov
       ,count(cs_quantity) as catalog_sales_quantitycount ,avg(cs_quantity) as catalog_sales_quantityave
       ,stddev_samp(cs_quantity) as catalog_sales_quantitystdev
       ,stddev_samp(cs_quantity)/avg(cs_quantity) as catalog_sales_quantitycov
 from store_sales
     ,store_returns
     ,catalog_sales
     ,date_dim d1
     ,date_dim d2
     ,date_dim d3
     ,store
     ,item
 where d1.d_quarter_name = '2001Q1'
   and d1.d_date_sk = ss_sold_date_sk
   and i_item_sk = ss_item_sk
   and s_store_sk = ss_store_sk
   and ss_customer_sk = sr_customer_sk
   and ss_item_sk = sr_item_sk
   and ss_ticket_number = sr_ticket_number
   and sr_returned_date_sk = d2.d_date_sk
   and d2.d_quarter_name in ('2001Q1','2001Q2','2001Q3')
   and sr_customer_sk = cs_bill_customer_sk
   and sr_item_sk = cs_item_sk
   and cs_sold_date_sk = d3.d_date_sk
   and d3.d_quarter_name in ('2001Q1','2001Q2','2001Q3')
 group by i_item_id
         ,i_item_desc
         ,s_state
 order by i_item_id
         ,i_item_desc
         ,s_state
limit 100;

-- end query 24 in stream 2 using template query17.tpl

Index :25
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803205045024g99a3aiihso_mcqa&token=bFBmcVNSSHQ4SXE5eVZ4bkZSVUthS0IxQlV3PSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTA1MCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDUwNDUwMjRnOTlhM2FpaWhzb19tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:50:44.993
endtime:2026-08-04 04:51:10.887
Cost time : 25894 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query25.sql
SQL:
-- start query 25 in stream 2 using template query63.tpl
select  * 
from (select i_manager_id
             ,sum(ss_sales_price) sum_sales
             ,avg(sum(ss_sales_price)) over (partition by i_manager_id) avg_monthly_sales
      from item
          ,store_sales
          ,date_dim
          ,store
      where ss_item_sk = i_item_sk
        and ss_sold_date_sk = d_date_sk
        and ss_store_sk = s_store_sk
        and d_month_seq in (1181,1181+1,1181+2,1181+3,1181+4,1181+5,1181+6,1181+7,1181+8,1181+9,1181+10,1181+11)
        and ((    i_category in ('Books','Children','Electronics')
              and i_class in ('personal','portable','reference','self-help')
              and i_brand in ('scholaramalgamalg #14','scholaramalgamalg #7',
		                  'exportiunivamalg #9','scholaramalgamalg #9'))
           or(    i_category in ('Women','Music','Men')
              and i_class in ('accessories','classical','fragrances','pants')
              and i_brand in ('amalgimporto #1','edu packscholar #1','exportiimporto #1',
		                 'importoamalg #1')))
group by i_manager_id, d_moy) tmp1
where case when avg_monthly_sales > 0 then abs (sum_sales - avg_monthly_sales) / avg_monthly_sales else null end > 0.1
order by i_manager_id
        ,avg_monthly_sales
        ,sum_sales
limit 100;

-- end query 25 in stream 2 using template query63.tpl

Index :26
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803205110920g99a3aiihsr_mcqa&token=dkIwd1BzT3JGSFp4SzdmSitVQ3N1QXp0azlBPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTA3Nix7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDUxMTA5MjBnOTlhM2FpaWhzcl9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:51:10.888
endtime:2026-08-04 04:51:18.870
Cost time : 7982 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query26.sql
SQL:
-- start query 26 in stream 2 using template query77.tpl
with ss as
 (select s_store_sk,
         sum(ss_ext_sales_price) as sales,
         sum(ss_net_profit) as profit
 from store_sales,
      date_dim,
      store
 where ss_sold_date_sk = d_date_sk
       and d_date between cast('2002-08-20' as date) 
                  and (cast('2002-08-20' as date) +  INTERVAL '30' DAY) 
       and ss_store_sk = s_store_sk
 group by s_store_sk)
 ,
 sr as
 (select s_store_sk,
         sum(sr_return_amt) as returns,
         sum(sr_net_loss) as profit_loss
 from store_returns,
      date_dim,
      store
 where sr_returned_date_sk = d_date_sk
       and d_date between cast('2002-08-20' as date)
                  and (cast('2002-08-20' as date) +  INTERVAL '30' DAY)
       and sr_store_sk = s_store_sk
 group by s_store_sk), 
 cs as
 (select cs_call_center_sk,
        sum(cs_ext_sales_price) as sales,
        sum(cs_net_profit) as profit
 from catalog_sales,
      date_dim
 where cs_sold_date_sk = d_date_sk
       and d_date between cast('2002-08-20' as date)
                  and (cast('2002-08-20' as date) +  INTERVAL '30' DAY)
 group by cs_call_center_sk 
 ), 
 cr as
 (select cr_call_center_sk,
         sum(cr_return_amount) as returns,
         sum(cr_net_loss) as profit_loss
 from catalog_returns,
      date_dim
 where cr_returned_date_sk = d_date_sk
       and d_date between cast('2002-08-20' as date)
                  and (cast('2002-08-20' as date) +  INTERVAL '30' DAY)
 group by cr_call_center_sk
 ), 
 ws as
 ( select wp_web_page_sk,
        sum(ws_ext_sales_price) as sales,
        sum(ws_net_profit) as profit
 from web_sales,
      date_dim,
      web_page
 where ws_sold_date_sk = d_date_sk
       and d_date between cast('2002-08-20' as date)
                  and (cast('2002-08-20' as date) +  INTERVAL '30' DAY)
       and ws_web_page_sk = wp_web_page_sk
 group by wp_web_page_sk), 
 wr as
 (select wp_web_page_sk,
        sum(wr_return_amt) as returns,
        sum(wr_net_loss) as profit_loss
 from web_returns,
      date_dim,
      web_page
 where wr_returned_date_sk = d_date_sk
       and d_date between cast('2002-08-20' as date)
                  and (cast('2002-08-20' as date) +  INTERVAL '30' DAY)
       and wr_web_page_sk = wp_web_page_sk
 group by wp_web_page_sk)
  select  channel
        , id
        , sum(sales) as sales
        , sum(returns) as returns
        , sum(profit) as profit
 from 
 (select 'store channel' as channel
        , ss.s_store_sk as id
        , sales
        , coalesce(returns, 0) as returns
        , (profit - coalesce(profit_loss,0)) as profit
 from   ss left join sr
        on  ss.s_store_sk = sr.s_store_sk
 union all
 select 'catalog channel' as channel
        , cs_call_center_sk as id
        , sales
        , returns
        , (profit - profit_loss) as profit
 from  cs
       , cr
 union all
 select 'web channel' as channel
        , ws.wp_web_page_sk as id
        , sales
        , coalesce(returns, 0) returns
        , (profit - coalesce(profit_loss,0)) as profit
 from   ws left join wr
        on  ws.wp_web_page_sk = wr.wp_web_page_sk
 ) x
 group by rollup (channel, id)
 order by channel
         ,id
 limit 100;

-- end query 26 in stream 2 using template query77.tpl

Index :27
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803205118904g99a3aiihst_mcqa&token=cUp4RjFPWlBoWnBEMVcwWCtuYU43bU9IditzPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTA4NCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDUxMTg5MDRnOTlhM2FpaWhzdF9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:51:18.870
endtime:2026-08-04 04:51:53.851
Cost time : 34981 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query27.sql
SQL:
-- start query 27 in stream 2 using template query19.tpl
select  i_brand_id brand_id, i_brand brand, i_manufact_id, i_manufact,
 	sum(ss_ext_sales_price) ext_price
 from date_dim, store_sales, item,customer,customer_address,store
 where d_date_sk = ss_sold_date_sk
   and ss_item_sk = i_item_sk
   and i_manager_id=55
   and d_moy=11
   and d_year=2000
   and ss_customer_sk = c_customer_sk 
   and c_current_addr_sk = ca_address_sk
   and substr(ca_zip,1,5) <> substr(s_zip,1,5) 
   and ss_store_sk = s_store_sk 
 group by i_brand
      ,i_brand_id
      ,i_manufact_id
      ,i_manufact
 order by ext_price desc
         ,i_brand
         ,i_brand_id
         ,i_manufact_id
         ,i_manufact
limit 100 ;

-- end query 27 in stream 2 using template query19.tpl

Index :28
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803205153883g99a3aiihsy_mcqa&token=clZtUzg0MHlzdXo0dStBNXdlYnFvNVpjcVYwPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTExOCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDUxNTM4ODNnOTlhM2FpaWhzeV9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:51:53.851
endtime:2026-08-04 04:52:03.974
Cost time : 10123 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query28.sql
SQL:
-- start query 28 in stream 2 using template query21.tpl
select  *
 from(select w_warehouse_name
            ,i_item_id
            ,sum(case when (cast(d_date as date) < cast ('2000-02-18' as date))
	                then inv_quantity_on_hand 
                      else 0 end) as inv_before
            ,sum(case when (cast(d_date as date) >= cast ('2000-02-18' as date))
                      then inv_quantity_on_hand 
                      else 0 end) as inv_after
   from inventory
       ,warehouse
       ,item
       ,date_dim
   where i_current_price between 0.99 and 1.49
     and i_item_sk          = inv_item_sk
     and inv_warehouse_sk   = w_warehouse_sk
     and inv_date_sk    = d_date_sk
     and d_date between (cast ('2000-02-18' as date) - INTERVAL '30' DAY)
                    and (cast ('2000-02-18' as date) + INTERVAL '30' DAY)
   group by w_warehouse_name, i_item_id) x
 where (case when inv_before > 0 
             then inv_after / inv_before 
             else null
             end) between 2.0/3.0 and 3.0/2.0
 order by w_warehouse_name
         ,i_item_id
 limit 100;

-- end query 28 in stream 2 using template query21.tpl

Index :29
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803205204018g99a3aiiht2_mcqa&token=Z3FhOEw5bjdkOFRpdjZteEhpem0yRGRTa3JVPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTEyNyx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDUyMDQwMThnOTlhM2FpaWh0Ml9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:52:03.974
endtime:2026-08-04 04:52:07.714
Cost time : 3740 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query29.sql
SQL:
-- start query 29 in stream 2 using template query31.tpl
with ss as
 (select ca_county,d_qoy, d_year,sum(ss_ext_sales_price) as store_sales
 from store_sales,date_dim,customer_address
 where ss_sold_date_sk = d_date_sk
  and ss_addr_sk=ca_address_sk
 group by ca_county,d_qoy, d_year),
 ws as
 (select ca_county,d_qoy, d_year,sum(ws_ext_sales_price) as web_sales
 from web_sales,date_dim,customer_address
 where ws_sold_date_sk = d_date_sk
  and ws_bill_addr_sk=ca_address_sk
 group by ca_county,d_qoy, d_year)
 select 
        ss1.ca_county
       ,ss1.d_year
       ,ws2.web_sales/ws1.web_sales web_q1_q2_increase
       ,ss2.store_sales/ss1.store_sales store_q1_q2_increase
       ,ws3.web_sales/ws2.web_sales web_q2_q3_increase
       ,ss3.store_sales/ss2.store_sales store_q2_q3_increase
 from
        ss ss1
       ,ss ss2
       ,ss ss3
       ,ws ws1
       ,ws ws2
       ,ws ws3
 where
    ss1.d_qoy = 1
    and ss1.d_year = 2000
    and ss1.ca_county = ss2.ca_county
    and ss2.d_qoy = 2
    and ss2.d_year = 2000
 and ss2.ca_county = ss3.ca_county
    and ss3.d_qoy = 3
    and ss3.d_year = 2000
    and ss1.ca_county = ws1.ca_county
    and ws1.d_qoy = 1
    and ws1.d_year = 2000
    and ws1.ca_county = ws2.ca_county
    and ws2.d_qoy = 2
    and ws2.d_year = 2000
    and ws1.ca_county = ws3.ca_county
    and ws3.d_qoy = 3
    and ws3.d_year =2000
    and case when ws1.web_sales > 0 then ws2.web_sales/ws1.web_sales else null end 
       > case when ss1.store_sales > 0 then ss2.store_sales/ss1.store_sales else null end
    and case when ws2.web_sales > 0 then ws3.web_sales/ws2.web_sales else null end
       > case when ss2.store_sales > 0 then ss3.store_sales/ss2.store_sales else null end
 order by web_q2_q3_increase;

-- end query 29 in stream 2 using template query31.tpl

Index :30
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803205207747g99a3aiiht4_mcqa&token=ejB2MnIrKzlneHJXNUc2STlvQWJuV2N4bU1zPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTEzMix7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDUyMDc3NDdnOTlhM2FpaWh0NF9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:52:07.714
endtime:2026-08-04 04:52:30.393
Cost time : 22679 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query30.sql
SQL:
-- start query 30 in stream 2 using template query93.tpl
select  ss_customer_sk
            ,sum(act_sales) sumsales
      from (select ss_item_sk
                  ,ss_ticket_number
                  ,ss_customer_sk
                  ,case when sr_return_quantity is not null then (ss_quantity-sr_return_quantity)*ss_sales_price
                                                            else (ss_quantity*ss_sales_price) end act_sales
            from store_sales left outer join store_returns on (sr_item_sk = ss_item_sk
                                                               and sr_ticket_number = ss_ticket_number)
                ,reason
            where sr_reason_sk = r_reason_sk
              and r_reason_desc = 'reason 73') t
      group by ss_customer_sk
      order by sumsales, ss_customer_sk
limit 100;

-- end query 30 in stream 2 using template query93.tpl

Index :31
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803205230427g99a3aiiht8_mcqa&token=eklZNHc0NGhueWxZeTFnVmdqeWNuYWwwcnhzPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTE1NSx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDUyMzA0MjdnOTlhM2FpaWh0OF9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:52:30.393
endtime:2026-08-04 04:53:28.209
Cost time : 57816 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query31.sql
SQL:
-- start query 31 in stream 2 using template query54.tpl
with my_customers as (
 select distinct c_customer_sk
        , c_current_addr_sk
 from   
        ( select cs_sold_date_sk sold_date_sk,
                 cs_bill_customer_sk customer_sk,
                 cs_item_sk item_sk
          from   catalog_sales
          union all
          select ws_sold_date_sk sold_date_sk,
                 ws_bill_customer_sk customer_sk,
                 ws_item_sk item_sk
          from   web_sales
         ) cs_or_ws_sales,
         item,
         date_dim,
         customer
 where   sold_date_sk = d_date_sk
         and item_sk = i_item_sk
         and i_category = 'Home'
         and i_class = 'paint'
         and c_customer_sk = cs_or_ws_sales.customer_sk
         and d_moy = 4
         and d_year = 2001
 )
 , my_revenue as (
 select c_customer_sk,
        sum(ss_ext_sales_price) as revenue
 from   my_customers,
        store_sales,
        customer_address,
        store,
        date_dim
 where  c_current_addr_sk = ca_address_sk
        and ca_county = s_county
        and ca_state = s_state
        and ss_sold_date_sk = d_date_sk
        and c_customer_sk = ss_customer_sk
        and d_month_seq between (select distinct d_month_seq+1
                                 from   date_dim where d_year = 2001 and d_moy = 4)
                           and  (select distinct d_month_seq+3
                                 from   date_dim where d_year = 2001 and d_moy = 4)
 group by c_customer_sk
 )
 , segments as
 (select cast((revenue/50) as int) as segment
  from   my_revenue
 )
  select  segment, count(*) as num_customers, segment*50 as segment_base
 from segments
 group by segment
 order by segment, num_customers
 limit 100;

-- end query 31 in stream 2 using template query54.tpl

Index :32
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803205328246g99a3aiihtd_mcqa&token=VS9uU3RQa1U5UmtRYkpSeXlqRE85a0FFTDk0PSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTIxMyx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDUzMjgyNDZnOTlhM2FpaWh0ZF9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:53:28.209
endtime:2026-08-04 04:54:33.714
Cost time : 65505 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query32.sql
SQL:
-- start query 32 in stream 2 using template query39.tpl
with inv as
(select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy
       ,stdev,mean, case mean when 0 then null else stdev/mean end cov
 from(select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy
            ,stddev_samp(inv_quantity_on_hand) stdev,avg(inv_quantity_on_hand) mean
      from inventory
          ,item
          ,warehouse
          ,date_dim
      where inv_item_sk = i_item_sk
        and inv_warehouse_sk = w_warehouse_sk
        and inv_date_sk = d_date_sk
        and d_year =2001
      group by w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy) foo
 where case mean when 0 then 0 else stdev/mean end > 1)
select inv1.w_warehouse_sk,inv1.i_item_sk,inv1.d_moy,inv1.mean, inv1.cov
        ,inv2.w_warehouse_sk,inv2.i_item_sk,inv2.d_moy,inv2.mean, inv2.cov
from inv inv1,inv inv2
where inv1.i_item_sk = inv2.i_item_sk
  and inv1.w_warehouse_sk =  inv2.w_warehouse_sk
  and inv1.d_moy=4
  and inv2.d_moy=4+1
order by inv1.w_warehouse_sk,inv1.i_item_sk,inv1.d_moy,inv1.mean,inv1.cov
        ,inv2.d_moy,inv2.mean, inv2.cov
;
with inv as
(select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy
       ,stdev,mean, case mean when 0 then null else stdev/mean end cov
 from(select w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy
            ,stddev_samp(inv_quantity_on_hand) stdev,avg(inv_quantity_on_hand) mean
      from inventory
          ,item
          ,warehouse
          ,date_dim
      where inv_item_sk = i_item_sk
        and inv_warehouse_sk = w_warehouse_sk
        and inv_date_sk = d_date_sk
        and d_year =2001
      group by w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy) foo
 where case mean when 0 then 0 else stdev/mean end > 1)
select inv1.w_warehouse_sk,inv1.i_item_sk,inv1.d_moy,inv1.mean, inv1.cov
        ,inv2.w_warehouse_sk,inv2.i_item_sk,inv2.d_moy,inv2.mean, inv2.cov
from inv inv1,inv inv2
where inv1.i_item_sk = inv2.i_item_sk
  and inv1.w_warehouse_sk =  inv2.w_warehouse_sk
  and inv1.d_moy=4
  and inv2.d_moy=4+1
  and inv1.cov > 1.5
order by inv1.w_warehouse_sk,inv1.i_item_sk,inv1.d_moy,inv1.mean,inv1.cov
        ,inv2.d_moy,inv2.mean, inv2.cov
;

-- end query 32 in stream 2 using template query39.tpl

Index :33
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803205433747g99a3aiihtl_mcqa&token=WTlNQ0tGVHFQeEZWemgzUktkTkN5aU9reTlRPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTI3OCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDU0MzM3NDdnOTlhM2FpaWh0bF9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:54:33.714
endtime:2026-08-04 04:55:23.987
Cost time : 50273 ms

Index :34
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803205524043g99a3aiihto_mcqa&token=Yk1QMWpiNmJJVG5BUzVqUkNtOGU4ODc5U3dnPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTMyOSx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDU1MjQwNDNnOTlhM2FpaWh0b19tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:55:23.988
endtime:2026-08-04 04:55:32.674
Cost time : 8686 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query33.sql
SQL:
-- start query 33 in stream 2 using template query10.tpl
select  
  cd_gender,
  cd_marital_status,
  cd_education_status,
  count(*) cnt1,
  cd_purchase_estimate,
  count(*) cnt2,
  cd_credit_rating,
  count(*) cnt3,
  cd_dep_count,
  count(*) cnt4,
  cd_dep_employed_count,
  count(*) cnt5,
  cd_dep_college_count,
  count(*) cnt6
 from
  customer c,customer_address ca,customer_demographics
 where
  c.c_current_addr_sk = ca.ca_address_sk and
  ca_county in ('Wibaux County','La Salle Parish','Polk County','Yolo County','Oktibbeha County') and
  cd_demo_sk = c.c_current_cdemo_sk and 
  exists (select *
          from store_sales,date_dim
          where c.c_customer_sk = ss_customer_sk and
                ss_sold_date_sk = d_date_sk and
                d_year = 2002 and
                d_moy between 3 and 3+3) and
   (exists (select *
            from web_sales,date_dim
            where c.c_customer_sk = ws_bill_customer_sk and
                  ws_sold_date_sk = d_date_sk and
                  d_year = 2002 and
                  d_moy between 3 ANd 3+3) or 
    exists (select * 
            from catalog_sales,date_dim
            where c.c_customer_sk = cs_ship_customer_sk and
                  cs_sold_date_sk = d_date_sk and
                  d_year = 2002 and
                  d_moy between 3 and 3+3))
 group by cd_gender,
          cd_marital_status,
          cd_education_status,
          cd_purchase_estimate,
          cd_credit_rating,
          cd_dep_count,
          cd_dep_employed_count,
          cd_dep_college_count
 order by cd_gender,
          cd_marital_status,
          cd_education_status,
          cd_purchase_estimate,
          cd_credit_rating,
          cd_dep_count,
          cd_dep_employed_count,
          cd_dep_college_count
limit 100;

-- end query 33 in stream 2 using template query10.tpl

Index :35
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803205532702g99a3aiihtp_mcqa&token=ajZMVmpCejFsN0svTHJBUkowd2QwdnNKVzlZPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTMzNyx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDU1MzI3MDJnOTlhM2FpaWh0cF9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:55:32.675
endtime:2026-08-04 04:55:45.569
Cost time : 12894 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query34.sql
SQL:
-- start query 34 in stream 2 using template query15.tpl
select  ca_zip
       ,sum(cs_sales_price)
 from catalog_sales
     ,customer
     ,customer_address
     ,date_dim
 where cs_bill_customer_sk = c_customer_sk
 	and c_current_addr_sk = ca_address_sk 
 	and ( substr(ca_zip,1,5) in ('85669', '86197','88274','83405','86475',
                                   '85392', '85460', '80348', '81792')
 	      or ca_state in ('CA','WA','GA')
 	      or cs_sales_price > 500)
 	and cs_sold_date_sk = d_date_sk
 	and d_qoy = 2 and d_year = 1999
 group by ca_zip
 order by ca_zip
 limit 100;

-- end query 34 in stream 2 using template query15.tpl

Index :36
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803205545602g99a3aiihtu_mcqa&token=ZCswZERXbENrS3NLcXAzRkJtUTRXWm53cHRRPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTM1MCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDU1NDU2MDJnOTlhM2FpaWh0dV9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:55:45.569
endtime:2026-08-04 04:55:57.137
Cost time : 11568 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query35.sql
SQL:
-- start query 35 in stream 2 using template query55.tpl
select  i_brand_id brand_id, i_brand brand,
 	sum(ss_ext_sales_price) ext_price
 from date_dim, store_sales, item
 where d_date_sk = ss_sold_date_sk
 	and ss_item_sk = i_item_sk
 	and i_manager_id=47
 	and d_moy=12
 	and d_year=1999
 group by i_brand, i_brand_id
 order by ext_price desc, i_brand_id
limit 100 ;

-- end query 35 in stream 2 using template query55.tpl

Index :37
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803205557168g99a3aiihtx_mcqa&token=MnVqYTJoVWZFWktsOU9GV3FuOEhOeVNMYTJvPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTM2Mix7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDU1NTcxNjhnOTlhM2FpaWh0eF9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:55:57.138
endtime:2026-08-04 04:56:14.281
Cost time : 17143 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query36.sql
SQL:
-- start query 36 in stream 2 using template query14.tpl
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 2000 AND 2000 + 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 2000 AND 2000 + 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 2000 AND 2000 + 2)
 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 2000 and 2000 + 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 2000 and 2000 + 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 2000 and 2000 + 2) x)
  select  channel, i_brand_id,i_class_id,i_category_id,sum(sales), sum(number_sales)
 from(
       select 'store' channel, i_brand_id,i_class_id
             ,i_category_id,sum(ss_quantity*ss_list_price) sales
             , count(*) number_sales
       from store_sales
           ,item
           ,date_dim
       where ss_item_sk in (select ss_item_sk from cross_items)
         and ss_item_sk = i_item_sk
         and ss_sold_date_sk = d_date_sk
         and d_year = 2000+2 
         and d_moy = 11
       group by i_brand_id,i_class_id,i_category_id
       having sum(ss_quantity*ss_list_price) > (select average_sales from avg_sales)
       union all
       select 'catalog' channel, i_brand_id,i_class_id,i_category_id, sum(cs_quantity*cs_list_price) sales, count(*) number_sales
       from catalog_sales
           ,item
           ,date_dim
       where cs_item_sk in (select ss_item_sk from cross_items)
         and cs_item_sk = i_item_sk
         and cs_sold_date_sk = d_date_sk
         and d_year = 2000+2 
         and d_moy = 11
       group by i_brand_id,i_class_id,i_category_id
       having sum(cs_quantity*cs_list_price) > (select average_sales from avg_sales)
       union all
       select 'web' channel, i_brand_id,i_class_id,i_category_id, sum(ws_quantity*ws_list_price) sales , count(*) number_sales
       from web_sales
           ,item
           ,date_dim
       where ws_item_sk in (select ss_item_sk from cross_items)
         and ws_item_sk = i_item_sk
         and ws_sold_date_sk = d_date_sk
         and d_year = 2000+2
         and d_moy = 11
       group by i_brand_id,i_class_id,i_category_id
       having sum(ws_quantity*ws_list_price) > (select average_sales from avg_sales)
 ) y
 group by rollup (channel, i_brand_id,i_class_id,i_category_id)
 order by channel,i_brand_id,i_class_id,i_category_id
 limit 100;
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 2000 AND 2000 + 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 2000 AND 2000 + 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 2000 AND 2000 + 2) x
 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 2000 and 2000 + 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 2000 and 2000 + 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 2000 and 2000 + 2) x)
  select  this_year.channel ty_channel
                           ,this_year.i_brand_id ty_brand
                           ,this_year.i_class_id ty_class
                           ,this_year.i_category_id ty_category
                           ,this_year.sales ty_sales
                           ,this_year.number_sales ty_number_sales
                           ,last_year.channel ly_channel
                           ,last_year.i_brand_id ly_brand
                           ,last_year.i_class_id ly_class
                           ,last_year.i_category_id ly_category
                           ,last_year.sales ly_sales
                           ,last_year.number_sales ly_number_sales 
 from
 (select 'store' channel, i_brand_id,i_class_id,i_category_id
        ,sum(ss_quantity*ss_list_price) sales, count(*) number_sales
 from store_sales 
     ,item
     ,date_dim
 where ss_item_sk in (select ss_item_sk from cross_items)
   and ss_item_sk = i_item_sk
   and ss_sold_date_sk = d_date_sk
   and d_week_seq = (select d_week_seq
                     from date_dim
                     where d_year = 2000 + 1
                       and d_moy = 12
                       and d_dom = 12)
 group by i_brand_id,i_class_id,i_category_id
 having sum(ss_quantity*ss_list_price) > (select average_sales from avg_sales)) this_year,
 (select 'store' channel, i_brand_id,i_class_id
        ,i_category_id, sum(ss_quantity*ss_list_price) sales, count(*) number_sales
 from store_sales
     ,item
     ,date_dim
 where ss_item_sk in (select ss_item_sk from cross_items)
   and ss_item_sk = i_item_sk
   and ss_sold_date_sk = d_date_sk
   and d_week_seq = (select d_week_seq
                     from date_dim
                     where d_year = 2000
                       and d_moy = 12
                       and d_dom = 12)
 group by i_brand_id,i_class_id,i_category_id
 having sum(ss_quantity*ss_list_price) > (select average_sales from avg_sales)) last_year
 where this_year.i_brand_id= last_year.i_brand_id
   and this_year.i_class_id = last_year.i_class_id
   and this_year.i_category_id = last_year.i_category_id
 order by this_year.channel, this_year.i_brand_id, this_year.i_class_id, this_year.i_category_id
 limit 100;

-- end query 36 in stream 2 using template query14.tpl

Index :38
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803205614322g99a3aiihu1_mcqa&token=QVRVQy9YOGlUbS9UYStreExuVHJicndGcW40PSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTM3OSx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDU2MTQzMjJnOTlhM2FpaWh1MV9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:56:14.281
endtime:2026-08-04 04:56:38.382
Cost time : 24101 ms

Index :39
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803205638415g99a3aiihu5_mcqa&token=dHZvT3kxWkg3TngreVkybExhaFk1czI2WHZRPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTQwMyx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDU2Mzg0MTVnOTlhM2FpaWh1NV9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:56:38.383
endtime:2026-08-04 04:56:51.438
Cost time : 13055 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query37.sql
SQL:
-- start query 37 in stream 2 using template query38.tpl
select  count(*) from (
    select distinct c_last_name, c_first_name, d_date
    from store_sales, date_dim, customer
          where store_sales.ss_sold_date_sk = date_dim.d_date_sk
      and store_sales.ss_customer_sk = customer.c_customer_sk
      and d_month_seq between 1213 and 1213 + 11
  intersect
    select distinct c_last_name, c_first_name, d_date
    from catalog_sales, date_dim, customer
          where catalog_sales.cs_sold_date_sk = date_dim.d_date_sk
      and catalog_sales.cs_bill_customer_sk = customer.c_customer_sk
      and d_month_seq between 1213 and 1213 + 11
  intersect
    select distinct c_last_name, c_first_name, d_date
    from web_sales, date_dim, customer
          where web_sales.ws_sold_date_sk = date_dim.d_date_sk
      and web_sales.ws_bill_customer_sk = customer.c_customer_sk
      and d_month_seq between 1213 and 1213 + 11
) hot_cust
limit 100;

-- end query 37 in stream 2 using template query38.tpl

Index :40
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803205651471g99a3aiihu8_mcqa&token=S2F0U0s2U3pWQk5jc2Fxdjc3aXM2dmxCY2JrPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTQxNix7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDU2NTE0NzFnOTlhM2FpaWh1OF9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:56:51.439
endtime:2026-08-04 04:57:23.477
Cost time : 32038 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query38.sql
SQL:
-- start query 38 in stream 2 using template query42.tpl
select  dt.d_year
 	,item.i_category_id
 	,item.i_category
 	,sum(ss_ext_sales_price)
 from 	date_dim dt
 	,store_sales
 	,item
 where dt.d_date_sk = store_sales.ss_sold_date_sk
 	and store_sales.ss_item_sk = item.i_item_sk
 	and item.i_manager_id = 1  	
 	and dt.d_moy=11
 	and dt.d_year=2001
 group by 	dt.d_year
 		,item.i_category_id
 		,item.i_category
 order by       sum(ss_ext_sales_price) desc,dt.d_year
 		,item.i_category_id
 		,item.i_category
limit 100 ;

-- end query 38 in stream 2 using template query42.tpl

Index :41
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803205723505g99a3aiihuc_mcqa&token=ZEF3MWJmcmVNOFAxU1NVeUVnaTFibGh4UDlvPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTQ0OCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDU3MjM1MDVnOTlhM2FpaWh1Y19tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:57:23.478
endtime:2026-08-04 04:57:46.525
Cost time : 23047 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query39.sql
SQL:
-- start query 39 in stream 2 using template query53.tpl
select  * from 
(select i_manufact_id,
sum(ss_sales_price) sum_sales,
avg(sum(ss_sales_price)) over (partition by i_manufact_id) avg_quarterly_sales
from item, store_sales, date_dim, store
where ss_item_sk = i_item_sk and
ss_sold_date_sk = d_date_sk and
ss_store_sk = s_store_sk and
d_month_seq in (1213,1213+1,1213+2,1213+3,1213+4,1213+5,1213+6,1213+7,1213+8,1213+9,1213+10,1213+11) and
((i_category in ('Books','Children','Electronics') and
i_class in ('personal','portable','reference','self-help') and
i_brand in ('scholaramalgamalg #14','scholaramalgamalg #7',
		'exportiunivamalg #9','scholaramalgamalg #9'))
or(i_category in ('Women','Music','Men') and
i_class in ('accessories','classical','fragrances','pants') and
i_brand in ('amalgimporto #1','edu packscholar #1','exportiimporto #1',
		'importoamalg #1')))
group by i_manufact_id, d_qoy ) tmp1
where case when avg_quarterly_sales > 0 
	then abs (sum_sales - avg_quarterly_sales)/ avg_quarterly_sales 
	else null end > 0.1
order by avg_quarterly_sales,
	 sum_sales,
	 i_manufact_id
limit 100;

-- end query 39 in stream 2 using template query53.tpl

Index :42
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803205746564g99a3aiihue_mcqa&token=YlRUSFdCRmFQTUppQzE4dm5DdmpsMjVJcW0wPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTQ3MSx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDU3NDY1NjRnOTlhM2FpaWh1ZV9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:57:46.526
endtime:2026-08-04 04:57:53.772
Cost time : 7246 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query40.sql
SQL:
-- start query 40 in stream 2 using template query45.tpl
select  ca_zip, ca_county, sum(ws_sales_price)
 from web_sales, customer, customer_address, date_dim, item
 where ws_bill_customer_sk = c_customer_sk
 	and c_current_addr_sk = ca_address_sk 
 	and ws_item_sk = i_item_sk 
 	and ( substr(ca_zip,1,5) in ('85669', '86197','88274','83405','86475', '85392', '85460', '80348', '81792')
 	      or 
 	      i_item_id in (select i_item_id
                             from item
                             where i_item_sk in (2, 3, 5, 7, 11, 13, 17, 19, 23, 29)
                             )
 	    )
 	and ws_sold_date_sk = d_date_sk
 	and d_qoy = 1 and d_year = 1999
 group by ca_zip, ca_county
 order by ca_zip, ca_county
 limit 100;

-- end query 40 in stream 2 using template query45.tpl

Index :43
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803205753804g99a3aiihug_mcqa&token=eU8wdXJhRytkYkRucnlrK08wRjZES2o3Y01FPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTQ3OCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDU3NTM4MDRnOTlhM2FpaWh1Z19tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:57:53.772
endtime:2026-08-04 04:58:05.697
Cost time : 11925 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query41.sql
SQL:
-- start query 41 in stream 2 using template query99.tpl
select  
   substr(w_warehouse_name,1,20)
  ,sm_type
  ,cc_name
  ,sum(case when (cs_ship_date_sk - cs_sold_date_sk <= 30 ) then 1 else 0 end)  as "30 days" 
  ,sum(case when (cs_ship_date_sk - cs_sold_date_sk > 30) and 
                 (cs_ship_date_sk - cs_sold_date_sk <= 60) then 1 else 0 end )  as "31-60 days" 
  ,sum(case when (cs_ship_date_sk - cs_sold_date_sk > 60) and 
                 (cs_ship_date_sk - cs_sold_date_sk <= 90) then 1 else 0 end)  as "61-90 days" 
  ,sum(case when (cs_ship_date_sk - cs_sold_date_sk > 90) and
                 (cs_ship_date_sk - cs_sold_date_sk <= 120) then 1 else 0 end)  as "91-120 days" 
  ,sum(case when (cs_ship_date_sk - cs_sold_date_sk  > 120) then 1 else 0 end)  as ">120 days" 
from
   catalog_sales
  ,warehouse
  ,ship_mode
  ,call_center
  ,date_dim
where
    d_month_seq between 1219 and 1219 + 11
and cs_ship_date_sk   = d_date_sk
and cs_warehouse_sk   = w_warehouse_sk
and cs_ship_mode_sk   = sm_ship_mode_sk
and cs_call_center_sk = cc_call_center_sk
group by
   substr(w_warehouse_name,1,20)
  ,sm_type
  ,cc_name
order by substr(w_warehouse_name,1,20)
        ,sm_type
        ,cc_name
limit 100;

-- end query 41 in stream 2 using template query99.tpl

Index :44
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803205805731g99a3aiihuk_mcqa&token=VU5Db2ludmFrWmVQVHRxVHB1WnZHYnE3dDJVPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTQ5MCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDU4MDU3MzFnOTlhM2FpaWh1a19tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:58:05.697
endtime:2026-08-04 04:58:50.378
Cost time : 44681 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query42.sql
SQL:
-- start query 42 in stream 2 using template query67.tpl
select  *
from (select i_category
            ,i_class
            ,i_brand
            ,i_product_name
            ,d_year
            ,d_qoy
            ,d_moy
            ,s_store_id
            ,sumsales
            ,rank() over (partition by i_category order by sumsales desc) rk
      from (select i_category
                  ,i_class
                  ,i_brand
                  ,i_product_name
                  ,d_year
                  ,d_qoy
                  ,d_moy
                  ,s_store_id
                  ,sum(coalesce(ss_sales_price*ss_quantity,0)) sumsales
            from store_sales
                ,date_dim
                ,store
                ,item
       where  ss_sold_date_sk=d_date_sk
          and ss_item_sk=i_item_sk
          and ss_store_sk = s_store_sk
          and d_month_seq between 1200 and 1200+11
       group by  rollup(i_category, i_class, i_brand, i_product_name, d_year, d_qoy, d_moy,s_store_id))dw1) dw2
where rk <= 100
order by i_category
        ,i_class
        ,i_brand
        ,i_product_name
        ,d_year
        ,d_qoy
        ,d_moy
        ,s_store_id
        ,sumsales
        ,rk
limit 100;

-- end query 42 in stream 2 using template query67.tpl

Index :45
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803205850421g99a3aiihun_mcqa&token=cDRRbHV5SkE1QUszaFJmTnhVNDk1dXloL1RBPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTUzNSx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDU4NTA0MjFnOTlhM2FpaWh1bl9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:58:50.378
endtime:2026-08-04 04:59:15.089
Cost time : 24711 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query43.sql
SQL:
-- start query 43 in stream 2 using template query23.tpl
with frequent_ss_items as 
 (select substr(i_item_desc,1,30) itemdesc,i_item_sk item_sk,d_date solddate,count(*) cnt
  from store_sales
      ,date_dim 
      ,item
  where ss_sold_date_sk = d_date_sk
    and ss_item_sk = i_item_sk 
    and d_year in (2000,2000+1,2000+2,2000+3)
  group by substr(i_item_desc,1,30),i_item_sk,d_date
  having count(*) >4),
 max_store_sales as
 (select max(csales) tpcds_cmax 
  from (select c_customer_sk,sum(ss_quantity*ss_sales_price) csales
        from store_sales
            ,customer
            ,date_dim 
        where ss_customer_sk = c_customer_sk
         and ss_sold_date_sk = d_date_sk
         and d_year in (2000,2000+1,2000+2,2000+3) 
        group by c_customer_sk)),
 best_ss_customer as
 (select c_customer_sk,sum(ss_quantity*ss_sales_price) ssales
  from store_sales
      ,customer
  where ss_customer_sk = c_customer_sk
  group by c_customer_sk
  having sum(ss_quantity*ss_sales_price) > (95/100.0) * (select
  *
from
 max_store_sales))
  select  sum(sales)
 from (select cs_quantity*cs_list_price sales
       from catalog_sales
           ,date_dim 
       where d_year = 2000 
         and d_moy = 3 
         and cs_sold_date_sk = d_date_sk 
         and cs_item_sk in (select item_sk from frequent_ss_items)
         and cs_bill_customer_sk in (select c_customer_sk from best_ss_customer)
      union all
      select ws_quantity*ws_list_price sales
       from web_sales 
           ,date_dim 
       where d_year = 2000 
         and d_moy = 3 
         and ws_sold_date_sk = d_date_sk 
         and ws_item_sk in (select item_sk from frequent_ss_items)
         and ws_bill_customer_sk in (select c_customer_sk from best_ss_customer)) 
 limit 100;
with frequent_ss_items as
 (select substr(i_item_desc,1,30) itemdesc,i_item_sk item_sk,d_date solddate,count(*) cnt
  from store_sales
      ,date_dim
      ,item
  where ss_sold_date_sk = d_date_sk
    and ss_item_sk = i_item_sk
    and d_year in (2000,2000 + 1,2000 + 2,2000 + 3)
  group by substr(i_item_desc,1,30),i_item_sk,d_date
  having count(*) >4),
 max_store_sales as
 (select max(csales) tpcds_cmax
  from (select c_customer_sk,sum(ss_quantity*ss_sales_price) csales
        from store_sales
            ,customer
            ,date_dim 
        where ss_customer_sk = c_customer_sk
         and ss_sold_date_sk = d_date_sk
         and d_year in (2000,2000+1,2000+2,2000+3)
        group by c_customer_sk)),
 best_ss_customer as
 (select c_customer_sk,sum(ss_quantity*ss_sales_price) ssales
  from store_sales
      ,customer
  where ss_customer_sk = c_customer_sk
  group by c_customer_sk
  having sum(ss_quantity*ss_sales_price) > (95/100.0) * (select
  *
 from max_store_sales))
  select  c_last_name,c_first_name,sales
 from (select c_last_name,c_first_name,sum(cs_quantity*cs_list_price) sales
        from catalog_sales
            ,customer
            ,date_dim 
        where d_year = 2000 
         and d_moy = 3 
         and cs_sold_date_sk = d_date_sk 
         and cs_item_sk in (select item_sk from frequent_ss_items)
         and cs_bill_customer_sk in (select c_customer_sk from best_ss_customer)
         and cs_bill_customer_sk = c_customer_sk 
       group by c_last_name,c_first_name
      union all
      select c_last_name,c_first_name,sum(ws_quantity*ws_list_price) sales
       from web_sales
           ,customer
           ,date_dim 
       where d_year = 2000 
         and d_moy = 3 
         and ws_sold_date_sk = d_date_sk 
         and ws_item_sk in (select item_sk from frequent_ss_items)
         and ws_bill_customer_sk in (select c_customer_sk from best_ss_customer)
         and ws_bill_customer_sk = c_customer_sk
       group by c_last_name,c_first_name) 
     order by c_last_name,c_first_name,sales
  limit 100;

-- end query 43 in stream 2 using template query23.tpl

Index :46
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803205915124g99a3aiihus_mcqa&token=SWxnaUROUnAxbng2QjZycUs4K2dHTldWUkZRPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTU2MCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDU5MTUxMjRnOTlhM2FpaWh1c19tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:59:15.089
endtime:2026-08-04 04:59:28.992
Cost time : 13903 ms

Index :47
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803205929026g99a3aiihux_mcqa&token=WGtBMGVyZitYSDZJMHNKTGcvRW9GTVkrQ2J3PSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTU3NCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDU5MjkwMjZnOTlhM2FpaWh1eF9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:59:28.993
endtime:2026-08-04 04:59:56.968
Cost time : 27975 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query44.sql
SQL:
-- start query 44 in stream 2 using template query62.tpl
select  
   substr(w_warehouse_name,1,20)
  ,sm_type
  ,web_name
  ,sum(case when (ws_ship_date_sk - ws_sold_date_sk <= 30 ) then 1 else 0 end)  as "30 days" 
  ,sum(case when (ws_ship_date_sk - ws_sold_date_sk > 30) and 
                 (ws_ship_date_sk - ws_sold_date_sk <= 60) then 1 else 0 end )  as "31-60 days" 
  ,sum(case when (ws_ship_date_sk - ws_sold_date_sk > 60) and 
                 (ws_ship_date_sk - ws_sold_date_sk <= 90) then 1 else 0 end)  as "61-90 days" 
  ,sum(case when (ws_ship_date_sk - ws_sold_date_sk > 90) and
                 (ws_ship_date_sk - ws_sold_date_sk <= 120) then 1 else 0 end)  as "91-120 days" 
  ,sum(case when (ws_ship_date_sk - ws_sold_date_sk  > 120) then 1 else 0 end)  as ">120 days" 
from
   web_sales
  ,warehouse
  ,ship_mode
  ,web_site
  ,date_dim
where
    d_month_seq between 1212 and 1212 + 11
and ws_ship_date_sk   = d_date_sk
and ws_warehouse_sk   = w_warehouse_sk
and ws_ship_mode_sk   = sm_ship_mode_sk
and ws_web_site_sk    = web_site_sk
group by
   substr(w_warehouse_name,1,20)
  ,sm_type
  ,web_name
order by substr(w_warehouse_name,1,20)
        ,sm_type
       ,web_name
limit 100;

-- end query 44 in stream 2 using template query62.tpl

Index :48
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803205956997g99a3aiihv1_mcqa&token=b3d1RGVkcHBOdlpJcDJpS2ZESXdhTnp3aUprPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTYwMix7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMDU5NTY5OTdnOTlhM2FpaWh2MV9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 04:59:56.968
endtime:2026-08-04 05:00:18.197
Cost time : 21229 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query45.sql
SQL:
-- start query 45 in stream 2 using template query30.tpl
with customer_total_return as
 (select wr_returning_customer_sk as ctr_customer_sk
        ,ca_state as ctr_state, 
 	sum(wr_return_amt) as ctr_total_return
 from web_returns
     ,date_dim
     ,customer_address
 where wr_returned_date_sk = d_date_sk 
   and d_year =2001
   and wr_returning_addr_sk = ca_address_sk 
 group by wr_returning_customer_sk
         ,ca_state)
  select  c_customer_id,c_salutation,c_first_name,c_last_name,c_preferred_cust_flag
       ,c_birth_day,c_birth_month,c_birth_year,c_birth_country,c_login,c_email_address
       ,c_last_review_date_sk,ctr_total_return
 from customer_total_return ctr1
     ,customer_address
     ,customer
 where ctr1.ctr_total_return > (select avg(ctr_total_return)*1.2
 			  from customer_total_return ctr2 
                  	  where ctr1.ctr_state = ctr2.ctr_state)
       and ca_address_sk = c_current_addr_sk
       and ca_state = 'MO'
       and ctr1.ctr_customer_sk = c_customer_sk
 order by c_customer_id,c_salutation,c_first_name,c_last_name,c_preferred_cust_flag
                  ,c_birth_day,c_birth_month,c_birth_year,c_birth_country,c_login,c_email_address
                  ,c_last_review_date_sk,ctr_total_return
limit 100;

-- end query 45 in stream 2 using template query30.tpl

Index :49
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803210018234g99a3aiihv3_mcqa&token=blhzSjN0aXVWRjdTUG53Y2NYSHFYa2VHKzY4PSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTYyMyx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTAwMTgyMzRnOTlhM2FpaWh2M19tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:00:18.198
endtime:2026-08-04 05:00:34.321
Cost time : 16123 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query46.sql
SQL:
-- start query 46 in stream 2 using template query86.tpl
select   
    sum(ws_net_paid) as total_sum
   ,i_category
   ,i_class
   ,grouping(i_category)+grouping(i_class) as lochierarchy
   ,rank() over (
 	partition by grouping(i_category)+grouping(i_class),
 	case when grouping(i_class) = 0 then i_category end 
 	order by sum(ws_net_paid) desc) as rank_within_parent
 from
    web_sales
   ,date_dim       d1
   ,item
 where
    d1.d_month_seq between 1192 and 1192+11
 and d1.d_date_sk = ws_sold_date_sk
 and i_item_sk  = ws_item_sk
 group by rollup(i_category,i_class)
 order by
   lochierarchy desc,
   case when lochierarchy = 0 then i_category end,
   rank_within_parent
 limit 100;

-- end query 46 in stream 2 using template query86.tpl

Index :50
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803210034354g99a3aiihv8_mcqa&token=Q3FQci9qeGdPbnlQS3NrQVdJVlB4UlVTeXdJPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTYzOSx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTAwMzQzNTRnOTlhM2FpaWh2OF9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:00:34.322
endtime:2026-08-04 05:01:06.527
Cost time : 32205 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query47.sql
SQL:
-- start query 47 in stream 2 using template query82.tpl
select  i_item_id
       ,i_item_desc
       ,i_current_price
 from item, inventory, date_dim, store_sales
 where i_current_price between 40 and 40+30
 and inv_item_sk = i_item_sk
 and d_date_sk=inv_date_sk
 and d_date between cast('1998-06-25' as date) and (cast('1998-06-25' as date) +  INTERVAL '60' DAY)
 and i_manufact_id in (421,995,614,270)
 and inv_quantity_on_hand between 100 and 500
 and ss_item_sk = i_item_sk
 group by i_item_id,i_item_desc,i_current_price
 order by i_item_id
 limit 100;

-- end query 47 in stream 2 using template query82.tpl

Index :51
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803210106562g99a3aiihvb_mcqa&token=bXBUZzRiaDE3ZlhoVnR3bWp4TjN5R3h5SE5ZPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTY3MSx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTAxMDY1NjJnOTlhM2FpaWh2Yl9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:01:06.527
endtime:2026-08-04 05:01:35.317
Cost time : 28790 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query48.sql
SQL:
-- start query 48 in stream 2 using template query25.tpl
select  
 i_item_id
 ,i_item_desc
 ,s_store_id
 ,s_store_name
 ,sum(ss_net_profit) as store_sales_profit
 ,sum(sr_net_loss) as store_returns_loss
 ,sum(cs_net_profit) as catalog_sales_profit
 from
 store_sales
 ,store_returns
 ,catalog_sales
 ,date_dim d1
 ,date_dim d2
 ,date_dim d3
 ,store
 ,item
 where
 d1.d_moy = 4
 and d1.d_year = 2000
 and d1.d_date_sk = ss_sold_date_sk
 and i_item_sk = ss_item_sk
 and s_store_sk = ss_store_sk
 and ss_customer_sk = sr_customer_sk
 and ss_item_sk = sr_item_sk
 and ss_ticket_number = sr_ticket_number
 and sr_returned_date_sk = d2.d_date_sk
 and d2.d_moy               between 4 and  10
 and d2.d_year              = 2000
 and sr_customer_sk = cs_bill_customer_sk
 and sr_item_sk = cs_item_sk
 and cs_sold_date_sk = d3.d_date_sk
 and d3.d_moy               between 4 and  10 
 and d3.d_year              = 2000
 group by
 i_item_id
 ,i_item_desc
 ,s_store_id
 ,s_store_name
 order by
 i_item_id
 ,i_item_desc
 ,s_store_id
 ,s_store_name
 limit 100;

-- end query 48 in stream 2 using template query25.tpl

Index :52
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803210135346g99a3aiihve_mcqa&token=SGdvbkVHdlpySlcvQityRE9JNDFpUmJpZWNrPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTcwMCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTAxMzUzNDZnOTlhM2FpaWh2ZV9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:01:35.317
endtime:2026-08-04 05:01:48.431
Cost time : 13114 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query49.sql
SQL:
-- start query 49 in stream 2 using template query16.tpl
select  
   count(distinct cs_order_number) as "order count"
  ,sum(cs_ext_ship_cost) as "total shipping cost"
  ,sum(cs_net_profit) as "total net profit"
from
   catalog_sales cs1
  ,date_dim
  ,customer_address
  ,call_center
where
    d_date between '2000-5-01' and 
           (cast('2000-5-01' as date) + INTERVAL '60' DAY)
and cs1.cs_ship_date_sk = d_date_sk
and cs1.cs_ship_addr_sk = ca_address_sk
and ca_state = 'NC'
and cs1.cs_call_center_sk = cc_call_center_sk
and cc_county in ('Bronx County','Marshall County','Maverick County','Walker County',
                  'Richland County'
)
and exists (select *
            from catalog_sales cs2
            where cs1.cs_order_number = cs2.cs_order_number
              and cs1.cs_warehouse_sk <> cs2.cs_warehouse_sk)
and not exists(select *
               from catalog_returns cr1
               where cs1.cs_order_number = cr1.cr_order_number)
order by count(distinct cs_order_number)
limit 100;

-- end query 49 in stream 2 using template query16.tpl

Index :53
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803210148467g99a3aiihvh_mcqa&token=MmdCUENRcUlnRTZBaVJ3ZWdpTXdxdnRHdjZ3PSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTcxMyx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTAxNDg0NjdnOTlhM2FpaWh2aF9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:01:48.432
endtime:2026-08-04 05:02:47.005
Cost time : 58573 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query50.sql
SQL:
-- start query 50 in stream 2 using template query81.tpl
with customer_total_return as
 (select cr_returning_customer_sk as ctr_customer_sk
        ,ca_state as ctr_state, 
 	sum(cr_return_amt_inc_tax) as ctr_total_return
 from catalog_returns
     ,date_dim
     ,customer_address
 where cr_returned_date_sk = d_date_sk 
   and d_year =2001
   and cr_returning_addr_sk = ca_address_sk 
 group by cr_returning_customer_sk
         ,ca_state )
  select  c_customer_id,c_salutation,c_first_name,c_last_name,ca_street_number,ca_street_name
                   ,ca_street_type,ca_suite_number,ca_city,ca_county,ca_state,ca_zip,ca_country,ca_gmt_offset
                  ,ca_location_type,ctr_total_return
 from customer_total_return ctr1
     ,customer_address
     ,customer
 where ctr1.ctr_total_return > (select avg(ctr_total_return)*1.2
 			  from customer_total_return ctr2 
                  	  where ctr1.ctr_state = ctr2.ctr_state)
       and ca_address_sk = c_current_addr_sk
       and ca_state = 'SC'
       and ctr1.ctr_customer_sk = c_customer_sk
 order by c_customer_id,c_salutation,c_first_name,c_last_name,ca_street_number,ca_street_name
                   ,ca_street_type,ca_suite_number,ca_city,ca_county,ca_state,ca_zip,ca_country,ca_gmt_offset
                  ,ca_location_type,ctr_total_return
 limit 100;

-- end query 50 in stream 2 using template query81.tpl

Index :54
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803210247039g99a3aiihvp_mcqa&token=OUtpUEZXZkZNd1NFZEREV0l0OVJsZGhyVzdBPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTc3Mix7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTAyNDcwMzlnOTlhM2FpaWh2cF9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:02:47.005
endtime:2026-08-04 05:03:08.644
Cost time : 21639 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query51.sql
SQL:
-- start query 51 in stream 2 using template query40.tpl
select  
   w_state
  ,i_item_id
  ,sum(case when (cast(d_date as date) < cast ('1998-02-13' as date)) 
 		then cs_sales_price - coalesce(cr_refunded_cash,0) else 0 end) as sales_before
  ,sum(case when (cast(d_date as date) >= cast ('1998-02-13' as date)) 
 		then cs_sales_price - coalesce(cr_refunded_cash,0) else 0 end) as sales_after
 from
   catalog_sales left outer join catalog_returns on
       (cs_order_number = cr_order_number 
        and cs_item_sk = cr_item_sk)
  ,warehouse 
  ,item
  ,date_dim
 where
     i_current_price between 0.99 and 1.49
 and i_item_sk          = cs_item_sk
 and cs_warehouse_sk    = w_warehouse_sk 
 and cs_sold_date_sk    = d_date_sk
 and d_date between (cast ('1998-02-13' as date) - INTERVAL '30' DAY)
                and (cast ('1998-02-13' as date) + INTERVAL '30' DAY) 
 group by
    w_state,i_item_id
 order by w_state,i_item_id
limit 100;

-- end query 51 in stream 2 using template query40.tpl

Index :55
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803210308674g99a3aiihvs_mcqa&token=L3oyZ3RsbWdmUXh4U3Zab0Y4WjhoR1VncFBnPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTc5Myx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTAzMDg2NzRnOTlhM2FpaWh2c19tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:03:08.645
endtime:2026-08-04 05:03:20.301
Cost time : 11656 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query52.sql
SQL:
-- start query 52 in stream 2 using template query44.tpl
select  asceding.rnk, i1.i_product_name best_performing, i2.i_product_name worst_performing
from(select *
     from (select item_sk,rank() over (order by rank_col asc) rnk
           from (select ss_item_sk item_sk,avg(ss_net_profit) rank_col 
                 from store_sales ss1
                 where ss_store_sk = 467
                 group by ss_item_sk
                 having avg(ss_net_profit) > 0.9*(select avg(ss_net_profit) rank_col
                                                  from store_sales
                                                  where ss_store_sk = 467
                                                    and ss_cdemo_sk is null
                                                  group by ss_store_sk))V1)V11
     where rnk  < 11) asceding,
    (select *
     from (select item_sk,rank() over (order by rank_col desc) rnk
           from (select ss_item_sk item_sk,avg(ss_net_profit) rank_col
                 from store_sales ss1
                 where ss_store_sk = 467
                 group by ss_item_sk
                 having avg(ss_net_profit) > 0.9*(select avg(ss_net_profit) rank_col
                                                  from store_sales
                                                  where ss_store_sk = 467
                                                    and ss_cdemo_sk is null
                                                  group by ss_store_sk))V2)V21
     where rnk  < 11) descending,
item i1,
item i2
where asceding.rnk = descending.rnk 
  and i1.i_item_sk=asceding.item_sk
  and i2.i_item_sk=descending.item_sk
order by asceding.rnk
limit 100;

-- end query 52 in stream 2 using template query44.tpl

Index :56
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803210320338g99a3aiihvv_mcqa&token=Ull2bW1wQkRkNkJBb1lEWktBRWE2ZEJOcTIwPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTgwNSx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTAzMjAzMzhnOTlhM2FpaWh2dl9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:03:20.301
endtime:2026-08-04 05:03:37.867
Cost time : 17566 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query53.sql
SQL:
-- start query 53 in stream 2 using template query50.tpl
select  
   s_store_name
  ,s_company_id
  ,s_street_number
  ,s_street_name
  ,s_street_type
  ,s_suite_number
  ,s_city
  ,s_county
  ,s_state
  ,s_zip
  ,sum(case when (sr_returned_date_sk - ss_sold_date_sk <= 30 ) then 1 else 0 end)  as "30 days" 
  ,sum(case when (sr_returned_date_sk - ss_sold_date_sk > 30) and 
                 (sr_returned_date_sk - ss_sold_date_sk <= 60) then 1 else 0 end )  as "31-60 days" 
  ,sum(case when (sr_returned_date_sk - ss_sold_date_sk > 60) and 
                 (sr_returned_date_sk - ss_sold_date_sk <= 90) then 1 else 0 end)  as "61-90 days" 
  ,sum(case when (sr_returned_date_sk - ss_sold_date_sk > 90) and
                 (sr_returned_date_sk - ss_sold_date_sk <= 120) then 1 else 0 end)  as "91-120 days" 
  ,sum(case when (sr_returned_date_sk - ss_sold_date_sk  > 120) then 1 else 0 end)  as ">120 days" 
from
   store_sales
  ,store_returns
  ,store
  ,date_dim d1
  ,date_dim d2
where
    d2.d_year = 2002
and d2.d_moy  = 10
and ss_ticket_number = sr_ticket_number
and ss_item_sk = sr_item_sk
and ss_sold_date_sk   = d1.d_date_sk
and sr_returned_date_sk   = d2.d_date_sk
and ss_customer_sk = sr_customer_sk
and ss_store_sk = s_store_sk
group by
   s_store_name
  ,s_company_id
  ,s_street_number
  ,s_street_name
  ,s_street_type
  ,s_suite_number
  ,s_city
  ,s_county
  ,s_state
  ,s_zip
order by s_store_name
        ,s_company_id
        ,s_street_number
        ,s_street_name
        ,s_street_type
        ,s_suite_number
        ,s_city
        ,s_county
        ,s_state
        ,s_zip
limit 100;

-- end query 53 in stream 2 using template query50.tpl

Index :57
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803210337902g99a3aiihvy_mcqa&token=R0VrRHZJNzVyYmIvUitRaXpuSmlib1llNUI0PSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTgyMix7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTAzMzc5MDJnOTlhM2FpaWh2eV9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:03:37.868
endtime:2026-08-04 05:04:10.427
Cost time : 32559 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query54.sql
SQL:
-- start query 54 in stream 2 using template query61.tpl
select  promotions,total,cast(promotions as decimal(15,4))/cast(total as decimal(15,4))*100
from
  (select sum(ss_ext_sales_price) promotions
   from  store_sales
        ,store
        ,promotion
        ,date_dim
        ,customer
        ,customer_address 
        ,item
   where ss_sold_date_sk = d_date_sk
   and   ss_store_sk = s_store_sk
   and   ss_promo_sk = p_promo_sk
   and   ss_customer_sk= c_customer_sk
   and   ca_address_sk = c_current_addr_sk
   and   ss_item_sk = i_item_sk 
   and   ca_gmt_offset = -7
   and   i_category = 'Home'
   and   (p_channel_dmail = 'Y' or p_channel_email = 'Y' or p_channel_tv = 'Y')
   and   s_gmt_offset = -7
   and   d_year = 1999
   and   d_moy  = 12) promotional_sales,
  (select sum(ss_ext_sales_price) total
   from  store_sales
        ,store
        ,date_dim
        ,customer
        ,customer_address
        ,item
   where ss_sold_date_sk = d_date_sk
   and   ss_store_sk = s_store_sk
   and   ss_customer_sk= c_customer_sk
   and   ca_address_sk = c_current_addr_sk
   and   ss_item_sk = i_item_sk
   and   ca_gmt_offset = -7
   and   i_category = 'Home'
   and   s_gmt_offset = -7
   and   d_year = 1999
   and   d_moy  = 12) all_sales
order by promotions, total
limit 100;

-- end query 54 in stream 2 using template query61.tpl

Index :58
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803210410460g99a3aiihw4_mcqa&token=cVFqWmFwOXVSaWIrRnp2djIrUjVRQnEyS2xnPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTg1NSx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTA0MTA0NjBnOTlhM2FpaWh3NF9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:04:10.428
endtime:2026-08-04 05:04:28.277
Cost time : 17849 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query55.sql
SQL:
-- start query 55 in stream 2 using template query85.tpl
select  substr(r_reason_desc,1,20)
       ,avg(ws_quantity)
       ,avg(wr_refunded_cash)
       ,avg(wr_fee)
 from web_sales, web_returns, web_page, customer_demographics cd1,
      customer_demographics cd2, customer_address, date_dim, reason 
 where ws_web_page_sk = wp_web_page_sk
   and ws_item_sk = wr_item_sk
   and ws_order_number = wr_order_number
   and ws_sold_date_sk = d_date_sk and d_year = 2002
   and cd1.cd_demo_sk = wr_refunded_cdemo_sk 
   and cd2.cd_demo_sk = wr_returning_cdemo_sk
   and ca_address_sk = wr_refunded_addr_sk
   and r_reason_sk = wr_reason_sk
   and
   (
    (
     cd1.cd_marital_status = 'U'
     and
     cd1.cd_marital_status = cd2.cd_marital_status
     and
     cd1.cd_education_status = '4 yr Degree'
     and 
     cd1.cd_education_status = cd2.cd_education_status
     and
     ws_sales_price between 100.00 and 150.00
    )
   or
    (
     cd1.cd_marital_status = 'W'
     and
     cd1.cd_marital_status = cd2.cd_marital_status
     and
     cd1.cd_education_status = 'Secondary' 
     and
     cd1.cd_education_status = cd2.cd_education_status
     and
     ws_sales_price between 50.00 and 100.00
    )
   or
    (
     cd1.cd_marital_status = 'M'
     and
     cd1.cd_marital_status = cd2.cd_marital_status
     and
     cd1.cd_education_status = 'College'
     and
     cd1.cd_education_status = cd2.cd_education_status
     and
     ws_sales_price between 150.00 and 200.00
    )
   )
   and
   (
    (
     ca_country = 'United States'
     and
     ca_state in ('NC', 'OK', 'CO')
     and ws_net_profit between 100 and 200  
    )
    or
    (
     ca_country = 'United States'
     and
     ca_state in ('IL', 'WV', 'KY')
     and ws_net_profit between 150 and 300  
    )
    or
    (
     ca_country = 'United States'
     and
     ca_state in ('TX', 'MA', 'PA')
     and ws_net_profit between 50 and 250  
    )
   )
group by r_reason_desc
order by substr(r_reason_desc,1,20)
        ,avg(ws_quantity)
        ,avg(wr_refunded_cash)
        ,avg(wr_fee)
limit 100;

-- end query 55 in stream 2 using template query85.tpl

Index :59
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803210428306g99a3aiihw8_mcqa&token=WDlVRWpud1pvbVo3Sm5mWXR2d1RGKysyTElnPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTg3Myx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTA0MjgzMDZnOTlhM2FpaWh3OF9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:04:28.277
endtime:2026-08-04 05:05:39.854
Cost time : 71577 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query56.sql
SQL:
-- start query 56 in stream 2 using template query73.tpl
select c_last_name
       ,c_first_name
       ,c_salutation
       ,c_preferred_cust_flag 
       ,ss_ticket_number
       ,cnt from
   (select ss_ticket_number
          ,ss_customer_sk
          ,count(*) cnt
    from store_sales,date_dim,store,household_demographics
    where store_sales.ss_sold_date_sk = date_dim.d_date_sk
    and store_sales.ss_store_sk = store.s_store_sk  
    and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
    and date_dim.d_dom between 1 and 2 
    and (household_demographics.hd_buy_potential = '1001-5000' or
         household_demographics.hd_buy_potential = 'Unknown')
    and household_demographics.hd_vehicle_count > 0
    and case when household_demographics.hd_vehicle_count > 0 then 
             household_demographics.hd_dep_count/ household_demographics.hd_vehicle_count else null end > 1
    and date_dim.d_year in (1999,1999+1,1999+2)
    and store.s_county in ('Carter County','Polk County','Buncombe County','Forest County')
    group by ss_ticket_number,ss_customer_sk) dj,customer
    where ss_customer_sk = c_customer_sk
      and cnt between 1 and 5
    order by cnt desc, c_last_name asc;

-- end query 56 in stream 2 using template query73.tpl

Index :60
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803210539888g99a3aiihwb_mcqa&token=UFhodGFMUGRtTjlLS1d2R2VFb1pySStKaWhFPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTk0NSx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTA1Mzk4ODhnOTlhM2FpaWh3Yl9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:05:39.854
endtime:2026-08-04 05:05:46.305
Cost time : 6451 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query57.sql
SQL:
-- start query 57 in stream 2 using template query95.tpl
with ws_wh as
(select ws1.ws_order_number,ws1.ws_warehouse_sk wh1,ws2.ws_warehouse_sk wh2
 from web_sales ws1,web_sales ws2
 where ws1.ws_order_number = ws2.ws_order_number
   and ws1.ws_warehouse_sk <> ws2.ws_warehouse_sk)
 select  
   count(distinct ws_order_number) as "order count"
  ,sum(ws_ext_ship_cost) as "total shipping cost"
  ,sum(ws_net_profit) as "total net profit"
from
   web_sales ws1
  ,date_dim
  ,customer_address
  ,web_site
where
    d_date between '2001-3-01' and 
           (cast('2001-3-01' as date) + INTERVAL '60' DAY)
and ws1.ws_ship_date_sk = d_date_sk 
and ws1.ws_ship_addr_sk = ca_address_sk 
and ca_state = 'WI'
and ws1.ws_web_site_sk = web_site_sk
and web_company_name = 'pri'
and ws1.ws_order_number in (select ws_order_number
                            from ws_wh)
and ws1.ws_order_number in (select wr_order_number
                            from web_returns,ws_wh
                            where wr_order_number = ws_wh.ws_order_number)
order by count(distinct ws_order_number)
limit 100;

-- end query 57 in stream 2 using template query95.tpl

Index :61
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803210546335g99a3aiihwd_mcqa&token=RXh4blpvTzNxbVdMbnB3c1dUMXJRZXpGdVBFPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTk1MSx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTA1NDYzMzVnOTlhM2FpaWh3ZF9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:05:46.305
endtime:2026-08-04 05:06:24.525
Cost time : 38220 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query58.sql
SQL:
-- start query 58 in stream 2 using template query84.tpl
select  c_customer_id as customer_id
       , coalesce(c_last_name,'') || ', ' || coalesce(c_first_name,'') as customername
 from customer
     ,customer_address
     ,customer_demographics
     ,household_demographics
     ,income_band
     ,store_returns
 where ca_city	        =  'Lakeside'
   and c_current_addr_sk = ca_address_sk
   and ib_lower_bound   >=  65038
   and ib_upper_bound   <=  65038 + 50000
   and ib_income_band_sk = hd_income_band_sk
   and cd_demo_sk = c_current_cdemo_sk
   and hd_demo_sk = c_current_hdemo_sk
   and sr_cdemo_sk = cd_demo_sk
 order by c_customer_id
 limit 100;

-- end query 58 in stream 2 using template query84.tpl

Index :62
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803210624556g99a3aiihwj_mcqa&token=WmZGM0puZjlGdUIxVVNkYlcxbDdIR053cDF3PSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NTk4OSx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTA2MjQ1NTZnOTlhM2FpaWh3al9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:06:24.526
endtime:2026-08-04 05:06:49.039
Cost time : 24513 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query59.sql
SQL:
-- start query 59 in stream 2 using template query4.tpl
with year_total as (
 select c_customer_id customer_id
       ,c_first_name customer_first_name
       ,c_last_name customer_last_name
       ,c_preferred_cust_flag customer_preferred_cust_flag
       ,c_birth_country customer_birth_country
       ,c_login customer_login
       ,c_email_address customer_email_address
       ,d_year dyear
       ,sum(((ss_ext_list_price-ss_ext_wholesale_cost-ss_ext_discount_amt)+ss_ext_sales_price)/2) year_total
       ,'s' sale_type
 from customer
     ,store_sales
     ,date_dim
 where c_customer_sk = ss_customer_sk
   and ss_sold_date_sk = d_date_sk
 group by c_customer_id
         ,c_first_name
         ,c_last_name
         ,c_preferred_cust_flag
         ,c_birth_country
         ,c_login
         ,c_email_address
         ,d_year
 union all
 select c_customer_id customer_id
       ,c_first_name customer_first_name
       ,c_last_name customer_last_name
       ,c_preferred_cust_flag customer_preferred_cust_flag
       ,c_birth_country customer_birth_country
       ,c_login customer_login
       ,c_email_address customer_email_address
       ,d_year dyear
       ,sum((((cs_ext_list_price-cs_ext_wholesale_cost-cs_ext_discount_amt)+cs_ext_sales_price)/2) ) year_total
       ,'c' sale_type
 from customer
     ,catalog_sales
     ,date_dim
 where c_customer_sk = cs_bill_customer_sk
   and cs_sold_date_sk = d_date_sk
 group by c_customer_id
         ,c_first_name
         ,c_last_name
         ,c_preferred_cust_flag
         ,c_birth_country
         ,c_login
         ,c_email_address
         ,d_year
union all
 select c_customer_id customer_id
       ,c_first_name customer_first_name
       ,c_last_name customer_last_name
       ,c_preferred_cust_flag customer_preferred_cust_flag
       ,c_birth_country customer_birth_country
       ,c_login customer_login
       ,c_email_address customer_email_address
       ,d_year dyear
       ,sum((((ws_ext_list_price-ws_ext_wholesale_cost-ws_ext_discount_amt)+ws_ext_sales_price)/2) ) year_total
       ,'w' sale_type
 from customer
     ,web_sales
     ,date_dim
 where c_customer_sk = ws_bill_customer_sk
   and ws_sold_date_sk = d_date_sk
 group by c_customer_id
         ,c_first_name
         ,c_last_name
         ,c_preferred_cust_flag
         ,c_birth_country
         ,c_login
         ,c_email_address
         ,d_year
         )
  select  
                  t_s_secyear.customer_id
                 ,t_s_secyear.customer_first_name
                 ,t_s_secyear.customer_last_name
                 ,t_s_secyear.customer_birth_country
 from year_total t_s_firstyear
     ,year_total t_s_secyear
     ,year_total t_c_firstyear
     ,year_total t_c_secyear
     ,year_total t_w_firstyear
     ,year_total t_w_secyear
 where t_s_secyear.customer_id = t_s_firstyear.customer_id
   and t_s_firstyear.customer_id = t_c_secyear.customer_id
   and t_s_firstyear.customer_id = t_c_firstyear.customer_id
   and t_s_firstyear.customer_id = t_w_firstyear.customer_id
   and t_s_firstyear.customer_id = t_w_secyear.customer_id
   and t_s_firstyear.sale_type = 's'
   and t_c_firstyear.sale_type = 'c'
   and t_w_firstyear.sale_type = 'w'
   and t_s_secyear.sale_type = 's'
   and t_c_secyear.sale_type = 'c'
   and t_w_secyear.sale_type = 'w'
   and t_s_firstyear.dyear =  2001
   and t_s_secyear.dyear = 2001+1
   and t_c_firstyear.dyear =  2001
   and t_c_secyear.dyear =  2001+1
   and t_w_firstyear.dyear = 2001
   and t_w_secyear.dyear = 2001+1
   and t_s_firstyear.year_total > 0
   and t_c_firstyear.year_total > 0
   and t_w_firstyear.year_total > 0
   and case when t_c_firstyear.year_total > 0 then t_c_secyear.year_total / t_c_firstyear.year_total else null end
           > case when t_s_firstyear.year_total > 0 then t_s_secyear.year_total / t_s_firstyear.year_total else null end
   and case when t_c_firstyear.year_total > 0 then t_c_secyear.year_total / t_c_firstyear.year_total else null end
           > case when t_w_firstyear.year_total > 0 then t_w_secyear.year_total / t_w_firstyear.year_total else null end
 order by t_s_secyear.customer_id
         ,t_s_secyear.customer_first_name
         ,t_s_secyear.customer_last_name
         ,t_s_secyear.customer_birth_country
limit 100;

-- end query 59 in stream 2 using template query4.tpl

Index :63
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803210649077g99a3aiihwm_mcqa&token=cnRETEROaXZNdmhWeVRKa2cwV3puOFQwZzV3PSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NjAxNCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTA2NDkwNzdnOTlhM2FpaWh3bV9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:06:49.040
endtime:2026-08-04 05:07:33.389
Cost time : 44349 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query60.sql
SQL:
-- start query 60 in stream 2 using template query37.tpl
select  i_item_id
       ,i_item_desc
       ,i_current_price
 from item, inventory, date_dim, catalog_sales
 where i_current_price between 34 and 34 + 30
 and inv_item_sk = i_item_sk
 and d_date_sk=inv_date_sk 
 and d_date between cast('2002-04-17' as date) and (cast('2002-04-17' as date) + INTERVAL '60' DAY)
 and i_manufact_id in (810,819,764,802)
 and inv_quantity_on_hand between 100 and 500
 and cs_item_sk = i_item_sk 
 group by i_item_id,i_item_desc,i_current_price
 order by i_item_id
 limit 100;

-- end query 60 in stream 2 using template query37.tpl

Index :64
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803210733422g99a3aiihwu_mcqa&token=emxpUTVMYlZ3d2Nhd1I0eWhGMklqYmpjMU04PSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NjA1OCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTA3MzM0MjJnOTlhM2FpaWh3dV9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:07:33.389
endtime:2026-08-04 05:07:52.923
Cost time : 19534 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query61.sql
SQL:
-- start query 61 in stream 2 using template query35.tpl
select   
  ca_state,
  cd_gender,
  cd_marital_status,
  cd_dep_count,
  count(*) cnt1,
  stddev_samp(cd_dep_count) aggone1,
  stddev_samp(cd_dep_count) aggtwo1,
  avg(cd_dep_count) aggthree1,
  cd_dep_employed_count,
  count(*) cnt2,
  stddev_samp(cd_dep_employed_count) aggone2,
  stddev_samp(cd_dep_employed_count) aggtwo2,
  avg(cd_dep_employed_count) aggthree2,
  cd_dep_college_count,
  count(*) cnt3,
  stddev_samp(cd_dep_college_count) aggone3,
  stddev_samp(cd_dep_college_count) aggtwo3,
  avg(cd_dep_college_count) aggthree3
 from
  customer c,customer_address ca,customer_demographics
 where
  c.c_current_addr_sk = ca.ca_address_sk and
  cd_demo_sk = c.c_current_cdemo_sk and 
  exists (select *
          from store_sales,date_dim
          where c.c_customer_sk = ss_customer_sk and
                ss_sold_date_sk = d_date_sk and
                d_year = 2001 and
                d_qoy < 4) and
   (exists (select *
            from web_sales,date_dim
            where c.c_customer_sk = ws_bill_customer_sk and
                  ws_sold_date_sk = d_date_sk and
                  d_year = 2001 and
                  d_qoy < 4) or 
    exists (select * 
            from catalog_sales,date_dim
            where c.c_customer_sk = cs_ship_customer_sk and
                  cs_sold_date_sk = d_date_sk and
                  d_year = 2001 and
                  d_qoy < 4))
 group by ca_state,
          cd_gender,
          cd_marital_status,
          cd_dep_count,
          cd_dep_employed_count,
          cd_dep_college_count
 order by ca_state,
          cd_gender,
          cd_marital_status,
          cd_dep_count,
          cd_dep_employed_count,
          cd_dep_college_count
 limit 100;

-- end query 61 in stream 2 using template query35.tpl

Index :65
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803210752956g99a3aiihww_mcqa&token=ZjZsOVBua2FDMWZ1MysxdG41MkpqUHpDMWs0PSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NjA3OCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTA3NTI5NTZnOTlhM2FpaWh3d19tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:07:52.925
endtime:2026-08-04 05:08:11.179
Cost time : 18254 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query62.sql
SQL:
-- start query 62 in stream 2 using template query94.tpl
select  
   count(distinct ws_order_number) as "order count"
  ,sum(ws_ext_ship_cost) as "total shipping cost"
  ,sum(ws_net_profit) as "total net profit"
from
   web_sales ws1
  ,date_dim
  ,customer_address
  ,web_site
where
    d_date between '2000-3-01' and 
           (cast('2000-3-01' as date) + INTERVAL '60' DAY)
and ws1.ws_ship_date_sk = d_date_sk 
and ws1.ws_ship_addr_sk = ca_address_sk 
and ca_state = 'VT'
and ws1.ws_web_site_sk = web_site_sk 
and web_company_name = 'pri'
and exists (select *
            from web_sales ws2
            where ws1.ws_order_number = ws2.ws_order_number
              and ws1.ws_warehouse_sk <> ws2.ws_warehouse_sk)
and not exists(select *
               from web_returns wr1
               where ws1.ws_order_number = wr1.wr_order_number)
order by count(distinct ws_order_number)
limit 100;

-- end query 62 in stream 2 using template query94.tpl

Index :66
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803210811252g99a3aiihx0_mcqa&token=SHdGbUZVQzNrL2JENTBZejdxMTFwd2ErT0s0PSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NjA5Nix7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTA4MTEyNTJnOTlhM2FpaWh4MF9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:08:11.179
endtime:2026-08-04 05:08:45.486
Cost time : 34307 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query63.sql
SQL:
-- start query 63 in stream 2 using template query58.tpl
with ss_items as
 (select i_item_id item_id
        ,sum(ss_ext_sales_price) ss_item_rev 
 from store_sales
     ,item
     ,date_dim
 where ss_item_sk = i_item_sk
   and d_date in (select d_date
                  from date_dim
                  where d_week_seq = (select d_week_seq 
                                      from date_dim
                                      where d_date = '2000-06-13'))
   and ss_sold_date_sk   = d_date_sk
 group by i_item_id),
 cs_items as
 (select i_item_id item_id
        ,sum(cs_ext_sales_price) cs_item_rev
  from catalog_sales
      ,item
      ,date_dim
 where cs_item_sk = i_item_sk
  and  d_date in (select d_date
                  from date_dim
                  where d_week_seq = (select d_week_seq 
                                      from date_dim
                                      where d_date = '2000-06-13'))
  and  cs_sold_date_sk = d_date_sk
 group by i_item_id),
 ws_items as
 (select i_item_id item_id
        ,sum(ws_ext_sales_price) ws_item_rev
  from web_sales
      ,item
      ,date_dim
 where ws_item_sk = i_item_sk
  and  d_date in (select d_date
                  from date_dim
                  where d_week_seq =(select d_week_seq 
                                     from date_dim
                                     where d_date = '2000-06-13'))
  and ws_sold_date_sk   = d_date_sk
 group by i_item_id)
  select  ss_items.item_id
       ,ss_item_rev
       ,ss_item_rev/((ss_item_rev+cs_item_rev+ws_item_rev)/3) * 100 ss_dev
       ,cs_item_rev
       ,cs_item_rev/((ss_item_rev+cs_item_rev+ws_item_rev)/3) * 100 cs_dev
       ,ws_item_rev
       ,ws_item_rev/((ss_item_rev+cs_item_rev+ws_item_rev)/3) * 100 ws_dev
       ,(ss_item_rev+cs_item_rev+ws_item_rev)/3 average
 from ss_items,cs_items,ws_items
 where ss_items.item_id=cs_items.item_id
   and ss_items.item_id=ws_items.item_id 
   and ss_item_rev between 0.9 * cs_item_rev and 1.1 * cs_item_rev
   and ss_item_rev between 0.9 * ws_item_rev and 1.1 * ws_item_rev
   and cs_item_rev between 0.9 * ss_item_rev and 1.1 * ss_item_rev
   and cs_item_rev between 0.9 * ws_item_rev and 1.1 * ws_item_rev
   and ws_item_rev between 0.9 * ss_item_rev and 1.1 * ss_item_rev
   and ws_item_rev between 0.9 * cs_item_rev and 1.1 * cs_item_rev
 order by item_id
         ,ss_item_rev
 limit 100;

-- end query 63 in stream 2 using template query58.tpl

Index :67
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803210845517g99a3aiihx6_mcqa&token=ZjA5akxhaG4wNXE4Q0V1dUNyWjJZTkt0YStzPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NjEzMCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTA4NDU1MTdnOTlhM2FpaWh4Nl9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:08:45.486
endtime:2026-08-04 05:09:05.959
Cost time : 20473 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query64.sql
SQL:
-- start query 64 in stream 2 using template query96.tpl
select  count(*) 
from store_sales
    ,household_demographics 
    ,time_dim, store
where ss_sold_time_sk = time_dim.t_time_sk   
    and ss_hdemo_sk = household_demographics.hd_demo_sk 
    and ss_store_sk = s_store_sk
    and time_dim.t_hour = 16
    and time_dim.t_minute >= 30
    and household_demographics.hd_dep_count = 8
    and store.s_store_name = 'ese'
order by count(*)
limit 100;

-- end query 64 in stream 2 using template query96.tpl

Index :68
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803210905989g99a3aiihx9_mcqa&token=ZzNoZDNYdXpnYWEvdkdrV0JUb3ZHV09YSWRNPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NjE1MSx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTA5MDU5ODlnOTlhM2FpaWh4OV9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:09:05.960
endtime:2026-08-04 05:09:31.801
Cost time : 25841 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query65.sql
SQL:
-- start query 65 in stream 2 using template query12.tpl
select  i_item_id
      ,i_item_desc 
      ,i_category 
      ,i_class 
      ,i_current_price
      ,sum(ws_ext_sales_price) as itemrevenue 
      ,sum(ws_ext_sales_price)*100/sum(sum(ws_ext_sales_price)) over
          (partition by i_class) as revenueratio
from	
	web_sales
    	,item 
    	,date_dim
where 
	ws_item_sk = i_item_sk 
  	and i_category in ('Home', 'Books', 'Shoes')
  	and ws_sold_date_sk = d_date_sk
	and d_date between cast('1999-02-21' as date) 
				and (cast('1999-02-21' as date) + INTERVAL '30' DAY)
group by 
	i_item_id
        ,i_item_desc 
        ,i_category
        ,i_class
        ,i_current_price
order by 
	i_category
        ,i_class
        ,i_item_id
        ,i_item_desc
        ,revenueratio
limit 100;

-- end query 65 in stream 2 using template query12.tpl

Index :69
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803210931838g99a3aiihxb_mcqa&token=YUtuQnhKVFJLL2hZMDZKcE9Wdlh0TWc2cmRFPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NjE3NCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTA5MzE4MzhnOTlhM2FpaWh4Yl9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:09:31.802
endtime:2026-08-04 05:09:35.252
Cost time : 3450 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query66.sql
SQL:
-- start query 66 in stream 2 using template query29.tpl
select   
     i_item_id
    ,i_item_desc
    ,s_store_id
    ,s_store_name
    ,avg(ss_quantity)        as store_sales_quantity
    ,avg(sr_return_quantity) as store_returns_quantity
    ,avg(cs_quantity)        as catalog_sales_quantity
 from
    store_sales
   ,store_returns
   ,catalog_sales
   ,date_dim             d1
   ,date_dim             d2
   ,date_dim             d3
   ,store
   ,item
 where
     d1.d_moy               = 4 
 and d1.d_year              = 2000
 and d1.d_date_sk           = ss_sold_date_sk
 and i_item_sk              = ss_item_sk
 and s_store_sk             = ss_store_sk
 and ss_customer_sk         = sr_customer_sk
 and ss_item_sk             = sr_item_sk
 and ss_ticket_number       = sr_ticket_number
 and sr_returned_date_sk    = d2.d_date_sk
 and d2.d_moy               between 4 and  4 + 3 
 and d2.d_year              = 2000
 and sr_customer_sk         = cs_bill_customer_sk
 and sr_item_sk             = cs_item_sk
 and cs_sold_date_sk        = d3.d_date_sk     
 and d3.d_year              in (2000,2000+1,2000+2)
 group by
    i_item_id
   ,i_item_desc
   ,s_store_id
   ,s_store_name
 order by
    i_item_id 
   ,i_item_desc
   ,s_store_id
   ,s_store_name
 limit 100;

-- end query 66 in stream 2 using template query29.tpl

Index :70
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803210935281g99a3aiihxd_mcqa&token=NGJhSXFvL280bHBPTVdLcXdxTnN6eDRoSjI4PSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NjE4MCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTA5MzUyODFnOTlhM2FpaWh4ZF9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:09:35.252
endtime:2026-08-04 05:10:00.343
Cost time : 25091 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query67.sql
SQL:
-- start query 67 in stream 2 using template query22.tpl
select  i_product_name
             ,i_brand
             ,i_class
             ,i_category
             ,avg(inv_quantity_on_hand) qoh
       from inventory
           ,date_dim
           ,item
       where inv_date_sk=d_date_sk
              and inv_item_sk=i_item_sk
              and d_month_seq between 1188 and 1188 + 11
       group by rollup(i_product_name
                       ,i_brand
                       ,i_class
                       ,i_category)
order by qoh, i_product_name, i_brand, i_class, i_category
limit 100;

-- end query 67 in stream 2 using template query22.tpl

Index :71
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803211000370g99a3aiihxg_mcqa&token=UUtQUmVITGNBaEJTNUxGMkNHVU8zQ1Q4bElRPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NjIwNSx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTEwMDAzNzBnOTlhM2FpaWh4Z19tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:10:00.344
endtime:2026-08-04 05:10:15.012
Cost time : 14668 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query68.sql
SQL:
-- start query 68 in stream 2 using template query51.tpl
WITH web_v1 as (
select
  ws_item_sk item_sk, d_date,
  sum(sum(ws_sales_price))
      over (partition by ws_item_sk order by d_date rows between unbounded preceding and current row) cume_sales
from web_sales
    ,date_dim
where ws_sold_date_sk=d_date_sk
  and d_month_seq between 1184 and 1184+11
  and ws_item_sk is not NULL
group by ws_item_sk, d_date),
store_v1 as (
select
  ss_item_sk item_sk, d_date,
  sum(sum(ss_sales_price))
      over (partition by ss_item_sk order by d_date rows between unbounded preceding and current row) cume_sales
from store_sales
    ,date_dim
where ss_sold_date_sk=d_date_sk
  and d_month_seq between 1184 and 1184+11
  and ss_item_sk is not NULL
group by ss_item_sk, d_date)
 select  *
from (select item_sk
     ,d_date
     ,web_sales
     ,store_sales
     ,max(web_sales)
         over (partition by item_sk order by d_date rows between unbounded preceding and current row) web_cumulative
     ,max(store_sales)
         over (partition by item_sk order by d_date rows between unbounded preceding and current row) store_cumulative
     from (select case when web.item_sk is not null then web.item_sk else store.item_sk end item_sk
                 ,case when web.d_date is not null then web.d_date else store.d_date end d_date
                 ,web.cume_sales web_sales
                 ,store.cume_sales store_sales
           from web_v1 web full outer join store_v1 store on (web.item_sk = store.item_sk
                                                          and web.d_date = store.d_date)
          )x )y
where web_cumulative > store_cumulative
order by item_sk
        ,d_date
limit 100;

-- end query 68 in stream 2 using template query51.tpl

Index :72
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803211015043g99a3aiihxi_mcqa&token=b01oVUJFZllrQnBHTlJsVWR0SDU0TXlxampnPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NjIyMCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTEwMTUwNDNnOTlhM2FpaWh4aV9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:10:15.012
endtime:2026-08-04 05:10:29.237
Cost time : 14225 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query69.sql
SQL:
-- start query 69 in stream 2 using template query36.tpl
select  
    sum(ss_net_profit)/sum(ss_ext_sales_price) as gross_margin
   ,i_category
   ,i_class
   ,grouping(i_category)+grouping(i_class) as lochierarchy
   ,rank() over (
 	partition by grouping(i_category)+grouping(i_class),
 	case when grouping(i_class) = 0 then i_category end 
 	order by sum(ss_net_profit)/sum(ss_ext_sales_price) asc) as rank_within_parent
 from
    store_sales
   ,date_dim       d1
   ,item
   ,store
 where
    d1.d_year = 2000 
 and d1.d_date_sk = ss_sold_date_sk
 and i_item_sk  = ss_item_sk 
 and s_store_sk  = ss_store_sk
 and s_state in ('NM','LA','AL','KY',
                 'AL','GA','GA','PA')
 group by rollup(i_category,i_class)
 order by
   lochierarchy desc
  ,case when lochierarchy = 0 then i_category end
  ,rank_within_parent
  limit 100;

-- end query 69 in stream 2 using template query36.tpl

Index :73
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803211029262g99a3aiihxo_mcqa&token=M2t3M2RqRjdzdTY0QjVZWDcxMFlvak5zaktvPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NjIzNCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTEwMjkyNjJnOTlhM2FpaWh4b19tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:10:29.237
endtime:2026-08-04 05:10:43.682
Cost time : 14445 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query70.sql
SQL:
-- start query 70 in stream 2 using template query43.tpl
select  s_store_name, s_store_id,
        sum(case when (d_day_name='Sunday') then ss_sales_price else null end) sun_sales,
        sum(case when (d_day_name='Monday') then ss_sales_price else null end) mon_sales,
        sum(case when (d_day_name='Tuesday') then ss_sales_price else  null end) tue_sales,
        sum(case when (d_day_name='Wednesday') then ss_sales_price else null end) wed_sales,
        sum(case when (d_day_name='Thursday') then ss_sales_price else null end) thu_sales,
        sum(case when (d_day_name='Friday') then ss_sales_price else null end) fri_sales,
        sum(case when (d_day_name='Saturday') then ss_sales_price else null end) sat_sales
 from date_dim, store_sales, store
 where d_date_sk = ss_sold_date_sk and
       s_store_sk = ss_store_sk and
       s_gmt_offset = -6 and
       d_year = 2001 
 group by s_store_name, s_store_id
 order by s_store_name, s_store_id,sun_sales,mon_sales,tue_sales,wed_sales,thu_sales,fri_sales,sat_sales
 limit 100;

-- end query 70 in stream 2 using template query43.tpl

Index :74
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803211043711g99a3aiihxr_mcqa&token=YjNlWXVZMkd6eG5OOHpkSEdKVjM0UXo1d1lNPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NjI0OCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTEwNDM3MTFnOTlhM2FpaWh4cl9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:10:43.683
endtime:2026-08-04 05:11:05.980
Cost time : 22297 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query71.sql
SQL:
-- start query 71 in stream 2 using template query64.tpl
with cs_ui as
 (select cs_item_sk
        ,sum(cs_ext_list_price) as sale,sum(cr_refunded_cash+cr_reversed_charge+cr_store_credit) as refund
  from catalog_sales
      ,catalog_returns
  where cs_item_sk = cr_item_sk
    and cs_order_number = cr_order_number
  group by cs_item_sk
  having sum(cs_ext_list_price)>2*sum(cr_refunded_cash+cr_reversed_charge+cr_store_credit)),
cross_sales as
 (select i_product_name product_name
     ,i_item_sk item_sk
     ,s_store_name store_name
     ,s_zip store_zip
     ,ad1.ca_street_number b_street_number
     ,ad1.ca_street_name b_street_name
     ,ad1.ca_city b_city
     ,ad1.ca_zip b_zip
     ,ad2.ca_street_number c_street_number
     ,ad2.ca_street_name c_street_name
     ,ad2.ca_city c_city
     ,ad2.ca_zip c_zip
     ,d1.d_year as syear
     ,d2.d_year as fsyear
     ,d3.d_year s2year
     ,count(*) cnt
     ,sum(ss_wholesale_cost) s1
     ,sum(ss_list_price) s2
     ,sum(ss_coupon_amt) s3
  FROM   store_sales
        ,store_returns
        ,cs_ui
        ,date_dim d1
        ,date_dim d2
        ,date_dim d3
        ,store
        ,customer
        ,customer_demographics cd1
        ,customer_demographics cd2
        ,promotion
        ,household_demographics hd1
        ,household_demographics hd2
        ,customer_address ad1
        ,customer_address ad2
        ,income_band ib1
        ,income_band ib2
        ,item
  WHERE  ss_store_sk = s_store_sk AND
         ss_sold_date_sk = d1.d_date_sk AND
         ss_customer_sk = c_customer_sk AND
         ss_cdemo_sk= cd1.cd_demo_sk AND
         ss_hdemo_sk = hd1.hd_demo_sk AND
         ss_addr_sk = ad1.ca_address_sk and
         ss_item_sk = i_item_sk and
         ss_item_sk = sr_item_sk and
         ss_ticket_number = sr_ticket_number and
         ss_item_sk = cs_ui.cs_item_sk and
         c_current_cdemo_sk = cd2.cd_demo_sk AND
         c_current_hdemo_sk = hd2.hd_demo_sk AND
         c_current_addr_sk = ad2.ca_address_sk and
         c_first_sales_date_sk = d2.d_date_sk and
         c_first_shipto_date_sk = d3.d_date_sk and
         ss_promo_sk = p_promo_sk and
         hd1.hd_income_band_sk = ib1.ib_income_band_sk and
         hd2.hd_income_band_sk = ib2.ib_income_band_sk and
         cd1.cd_marital_status <> cd2.cd_marital_status and
         i_color in ('honeydew','puff','burlywood','coral','orange','blush') and
         i_current_price between 20 and 20 + 10 and
         i_current_price between 20 + 1 and 20 + 15
group by i_product_name
       ,i_item_sk
       ,s_store_name
       ,s_zip
       ,ad1.ca_street_number
       ,ad1.ca_street_name
       ,ad1.ca_city
       ,ad1.ca_zip
       ,ad2.ca_street_number
       ,ad2.ca_street_name
       ,ad2.ca_city
       ,ad2.ca_zip
       ,d1.d_year
       ,d2.d_year
       ,d3.d_year
)
select cs1.product_name
     ,cs1.store_name
     ,cs1.store_zip
     ,cs1.b_street_number
     ,cs1.b_street_name
     ,cs1.b_city
     ,cs1.b_zip
     ,cs1.c_street_number
     ,cs1.c_street_name
     ,cs1.c_city
     ,cs1.c_zip
     ,cs1.syear
     ,cs1.cnt
     ,cs1.s1 as s11
     ,cs1.s2 as s21
     ,cs1.s3 as s31
     ,cs2.s1 as s12
     ,cs2.s2 as s22
     ,cs2.s3 as s32
     ,cs2.syear
     ,cs2.cnt
from cross_sales cs1,cross_sales cs2
where cs1.item_sk=cs2.item_sk and
     cs1.syear = 1999 and
     cs2.syear = 1999 + 1 and
     cs2.cnt <= cs1.cnt and
     cs1.store_name = cs2.store_name and
     cs1.store_zip = cs2.store_zip
order by cs1.product_name
       ,cs1.store_name
       ,cs2.cnt
       ,cs1.s1
       ,cs2.s1;

-- end query 71 in stream 2 using template query64.tpl

Index :75
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803211106021g99a3aiihxu_mcqa&token=YkNRbDhXeHRjM1hDUkgwa3MrelV0b3UxSkJFPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NjI3MSx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTExMDYwMjFnOTlhM2FpaWh4dV9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:11:05.980
endtime:2026-08-04 05:12:18.578
Cost time : 72598 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query72.sql
SQL:
-- start query 72 in stream 2 using template query20.tpl
select  i_item_id
       ,i_item_desc 
       ,i_category 
       ,i_class 
       ,i_current_price
       ,sum(cs_ext_sales_price) as itemrevenue 
       ,sum(cs_ext_sales_price)*100/sum(sum(cs_ext_sales_price)) over
           (partition by i_class) as revenueratio
 from	catalog_sales
     ,item 
     ,date_dim
 where cs_item_sk = i_item_sk 
   and i_category in ('Shoes', 'Electronics', 'Jewelry')
   and cs_sold_date_sk = d_date_sk
 and d_date between cast('1998-01-13' as date) 
 				and (cast('1998-01-13' as date) + INTERVAL '30' DAY)
 group by i_item_id
         ,i_item_desc 
         ,i_category
         ,i_class
         ,i_current_price
 order by i_category
         ,i_class
         ,i_item_id
         ,i_item_desc
         ,revenueratio
limit 100;

-- end query 72 in stream 2 using template query20.tpl

Index :76
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803211218611g99a3aiihy6_mcqa&token=YUxBd1NGdmpYdHhJNXNFN1MybzNXbEhCUy9ZPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NjM0Myx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTEyMTg2MTFnOTlhM2FpaWh5Nl9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:12:18.579
endtime:2026-08-04 05:12:32.238
Cost time : 13659 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query73.sql
SQL:
-- start query 73 in stream 2 using template query57.tpl
with v1 as(
 select i_category, i_brand,
        cc_name,
        d_year, d_moy,
        sum(cs_sales_price) sum_sales,
        avg(sum(cs_sales_price)) over
          (partition by i_category, i_brand,
                     cc_name, d_year)
          avg_monthly_sales,
        rank() over
          (partition by i_category, i_brand,
                     cc_name
           order by d_year, d_moy) rn
 from item, catalog_sales, date_dim, call_center
 where cs_item_sk = i_item_sk and
       cs_sold_date_sk = d_date_sk and
       cc_call_center_sk= cs_call_center_sk and
       (
         d_year = 2001 or
         ( d_year = 2001-1 and d_moy =12) or
         ( d_year = 2001+1 and d_moy =1)
       )
 group by i_category, i_brand,
          cc_name , d_year, d_moy),
 v2 as(
 select v1.i_category
        ,v1.d_year, v1.d_moy
        ,v1.avg_monthly_sales
        ,v1.sum_sales, v1_lag.sum_sales psum, v1_lead.sum_sales nsum
 from v1, v1 v1_lag, v1 v1_lead
 where v1.i_category = v1_lag.i_category and
       v1.i_category = v1_lead.i_category and
       v1.i_brand = v1_lag.i_brand and
       v1.i_brand = v1_lead.i_brand and
       v1. cc_name = v1_lag. cc_name and
       v1. cc_name = v1_lead. cc_name and
       v1.rn = v1_lag.rn + 1 and
       v1.rn = v1_lead.rn - 1)
  select  *
 from v2
 where  d_year = 2001 and
        avg_monthly_sales > 0 and
        case when avg_monthly_sales > 0 then abs(sum_sales - avg_monthly_sales) / avg_monthly_sales else null end > 0.1
 order by sum_sales - avg_monthly_sales, nsum
 limit 100;

-- end query 73 in stream 2 using template query57.tpl

Index :77
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803211232270g99a3aiihy8_mcqa&token=WWlXdERqNUswTnAzWG53ODNIaTBlYnA3RndJPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NjM1Nyx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTEyMzIyNzBnOTlhM2FpaWh5OF9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:12:32.239
endtime:2026-08-04 05:12:42.044
Cost time : 9805 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query74.sql
SQL:
-- start query 74 in stream 2 using template query9.tpl
select case when (select count(*) 
                  from store_sales 
                  where ss_quantity between 1 and 20) > 3858182026
            then (select avg(ss_ext_tax) 
                  from store_sales 
                  where ss_quantity between 1 and 20) 
            else (select avg(ss_net_paid)
                  from store_sales
                  where ss_quantity between 1 and 20) end bucket1 ,
       case when (select count(*)
                  from store_sales
                  where ss_quantity between 21 and 40) > 3623465890
            then (select avg(ss_ext_tax)
                  from store_sales
                  where ss_quantity between 21 and 40) 
            else (select avg(ss_net_paid)
                  from store_sales
                  where ss_quantity between 21 and 40) end bucket2,
       case when (select count(*)
                  from store_sales
                  where ss_quantity between 41 and 60) > 3384697596
            then (select avg(ss_ext_tax)
                  from store_sales
                  where ss_quantity between 41 and 60)
            else (select avg(ss_net_paid)
                  from store_sales
                  where ss_quantity between 41 and 60) end bucket3,
       case when (select count(*)
                  from store_sales
                  where ss_quantity between 61 and 80) > 2756898159
            then (select avg(ss_ext_tax)
                  from store_sales
                  where ss_quantity between 61 and 80)
            else (select avg(ss_net_paid)
                  from store_sales
                  where ss_quantity between 61 and 80) end bucket4,
       case when (select count(*)
                  from store_sales
                  where ss_quantity between 81 and 100) > 1935477762
            then (select avg(ss_ext_tax)
                  from store_sales
                  where ss_quantity between 81 and 100)
            else (select avg(ss_net_paid)
                  from store_sales
                  where ss_quantity between 81 and 100) end bucket5
from reason
where r_reason_sk = 1
;

-- end query 74 in stream 2 using template query9.tpl

Index :78
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803211242084g99a3aiihyb_mcqa&token=anlZdnJqRkZMeTlEdHJPY3RWVU5lNGQ3eEhvPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NjM2Nyx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTEyNDIwODRnOTlhM2FpaWh5Yl9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:12:42.051
endtime:2026-08-04 05:13:56.352
Cost time : 74301 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query75.sql
SQL:
-- start query 75 in stream 2 using template query52.tpl
select  dt.d_year
 	,item.i_brand_id brand_id
 	,item.i_brand brand
 	,sum(ss_ext_sales_price) ext_price
 from date_dim dt
     ,store_sales
     ,item
 where dt.d_date_sk = store_sales.ss_sold_date_sk
    and store_sales.ss_item_sk = item.i_item_sk
    and item.i_manager_id = 1
    and dt.d_moy=11
    and dt.d_year=2000
 group by dt.d_year
 	,item.i_brand
 	,item.i_brand_id
 order by dt.d_year
 	,ext_price desc
 	,brand_id
limit 100 ;

-- end query 75 in stream 2 using template query52.tpl

Index :79
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803211356392g99a3aiihyf_mcqa&token=Zk9CQ1V6RElNRy9qcVhTR2RNTjdzKzd5QndJPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NjQ0MSx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTEzNTYzOTJnOTlhM2FpaWh5Zl9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:13:56.353
endtime:2026-08-04 05:14:18.055
Cost time : 21702 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query76.sql
SQL:
-- start query 76 in stream 2 using template query49.tpl
select  channel, item, return_ratio, return_rank, currency_rank from
 (select
 'web' as channel
 ,web.item
 ,web.return_ratio
 ,web.return_rank
 ,web.currency_rank
 from (
 	select 
 	 item
 	,return_ratio
 	,currency_ratio
 	,rank() over (order by return_ratio) as return_rank
 	,rank() over (order by currency_ratio) as currency_rank
 	from
 	(	select ws.ws_item_sk as item
 		,(cast(sum(coalesce(wr.wr_return_quantity,0)) as decimal(15,4))/
 		cast(sum(coalesce(ws.ws_quantity,0)) as decimal(15,4) )) as return_ratio
 		,(cast(sum(coalesce(wr.wr_return_amt,0)) as decimal(15,4))/
 		cast(sum(coalesce(ws.ws_net_paid,0)) as decimal(15,4) )) as currency_ratio
 		from 
 		 web_sales ws left outer join web_returns wr 
 			on (ws.ws_order_number = wr.wr_order_number and 
 			ws.ws_item_sk = wr.wr_item_sk)
                 ,date_dim
 		where 
 			wr.wr_return_amt > 10000 
 			and ws.ws_net_profit > 1
                         and ws.ws_net_paid > 0
                         and ws.ws_quantity > 0
                         and ws_sold_date_sk = d_date_sk
                         and d_year = 1999
                         and d_moy = 12
 		group by ws.ws_item_sk
 	) in_web
 ) web
 where 
 (
 web.return_rank <= 10
 or
 web.currency_rank <= 10
 )
 union
 select 
 'catalog' as channel
 ,catalog.item
 ,catalog.return_ratio
 ,catalog.return_rank
 ,catalog.currency_rank
 from (
 	select 
 	 item
 	,return_ratio
 	,currency_ratio
 	,rank() over (order by return_ratio) as return_rank
 	,rank() over (order by currency_ratio) as currency_rank
 	from
 	(	select 
 		cs.cs_item_sk as item
 		,(cast(sum(coalesce(cr.cr_return_quantity,0)) as decimal(15,4))/
 		cast(sum(coalesce(cs.cs_quantity,0)) as decimal(15,4) )) as return_ratio
 		,(cast(sum(coalesce(cr.cr_return_amount,0)) as decimal(15,4))/
 		cast(sum(coalesce(cs.cs_net_paid,0)) as decimal(15,4) )) as currency_ratio
 		from 
 		catalog_sales cs left outer join catalog_returns cr
 			on (cs.cs_order_number = cr.cr_order_number and 
 			cs.cs_item_sk = cr.cr_item_sk)
                ,date_dim
 		where 
 			cr.cr_return_amount > 10000 
 			and cs.cs_net_profit > 1
                         and cs.cs_net_paid > 0
                         and cs.cs_quantity > 0
                         and cs_sold_date_sk = d_date_sk
                         and d_year = 1999
                         and d_moy = 12
                 group by cs.cs_item_sk
 	) in_cat
 ) catalog
 where 
 (
 catalog.return_rank <= 10
 or
 catalog.currency_rank <=10
 )
 union
 select 
 'store' as channel
 ,store.item
 ,store.return_ratio
 ,store.return_rank
 ,store.currency_rank
 from (
 	select 
 	 item
 	,return_ratio
 	,currency_ratio
 	,rank() over (order by return_ratio) as return_rank
 	,rank() over (order by currency_ratio) as currency_rank
 	from
 	(	select sts.ss_item_sk as item
 		,(cast(sum(coalesce(sr.sr_return_quantity,0)) as decimal(15,4))/cast(sum(coalesce(sts.ss_quantity,0)) as decimal(15,4) )) as return_ratio
 		,(cast(sum(coalesce(sr.sr_return_amt,0)) as decimal(15,4))/cast(sum(coalesce(sts.ss_net_paid,0)) as decimal(15,4) )) as currency_ratio
 		from 
 		store_sales sts left outer join store_returns sr
 			on (sts.ss_ticket_number = sr.sr_ticket_number and sts.ss_item_sk = sr.sr_item_sk)
                ,date_dim
 		where 
 			sr.sr_return_amt > 10000 
 			and sts.ss_net_profit > 1
                         and sts.ss_net_paid > 0 
                         and sts.ss_quantity > 0
                         and ss_sold_date_sk = d_date_sk
                         and d_year = 1999
                         and d_moy = 12
 		group by sts.ss_item_sk
 	) in_store
 ) store
 where  (
 store.return_rank <= 10
 or 
 store.currency_rank <= 10
 )
 )
 order by 1,4,5,2
 limit 100;

-- end query 76 in stream 2 using template query49.tpl

Index :80
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803211418089g99a3aiihyi_mcqa&token=WVRWdVlETDhjVWxNaGJ1NUZLQkZRRDAvY2prPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NjQ2Myx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTE0MTgwODlnOTlhM2FpaWh5aV9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:14:18.056
endtime:2026-08-04 05:14:43.875
Cost time : 25819 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query77.sql
SQL:
-- start query 77 in stream 2 using template query71.tpl
select i_brand_id brand_id, i_brand brand,t_hour,t_minute,
 	sum(ext_price) ext_price
 from item, (select ws_ext_sales_price as ext_price, 
                        ws_sold_date_sk as sold_date_sk,
                        ws_item_sk as sold_item_sk,
                        ws_sold_time_sk as time_sk  
                 from web_sales,date_dim
                 where d_date_sk = ws_sold_date_sk
                   and d_moy=11
                   and d_year=2002
                 union all
                 select cs_ext_sales_price as ext_price,
                        cs_sold_date_sk as sold_date_sk,
                        cs_item_sk as sold_item_sk,
                        cs_sold_time_sk as time_sk
                 from catalog_sales,date_dim
                 where d_date_sk = cs_sold_date_sk
                   and d_moy=11
                   and d_year=2002
                 union all
                 select ss_ext_sales_price as ext_price,
                        ss_sold_date_sk as sold_date_sk,
                        ss_item_sk as sold_item_sk,
                        ss_sold_time_sk as time_sk
                 from store_sales,date_dim
                 where d_date_sk = ss_sold_date_sk
                   and d_moy=11
                   and d_year=2002
                 ) tmp,time_dim
 where
   sold_item_sk = i_item_sk
   and i_manager_id=1
   and time_sk = t_time_sk
   and (t_meal_time = 'breakfast' or t_meal_time = 'dinner')
 group by i_brand, i_brand_id,t_hour,t_minute
 order by ext_price desc, i_brand_id
 ;

-- end query 77 in stream 2 using template query71.tpl

Index :81
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803211443904g99a3aiihym_mcqa&token=UmlyMklGNm5pNzBFU1VmSk1mZlU5R05FVStBPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NjQ4OSx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTE0NDM5MDRnOTlhM2FpaWh5bV9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:14:43.876
endtime:2026-08-04 05:15:31.474
Cost time : 47598 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query78.sql
SQL:
-- start query 78 in stream 2 using template query72.tpl
select  i_item_desc
      ,w_warehouse_name
      ,d1.d_week_seq
      ,sum(case when p_promo_sk is null then 1 else 0 end) no_promo
      ,sum(case when p_promo_sk is not null then 1 else 0 end) promo
      ,count(*) total_cnt
from catalog_sales
join inventory on (cs_item_sk = inv_item_sk)
join warehouse on (w_warehouse_sk=inv_warehouse_sk)
join item on (i_item_sk = cs_item_sk)
join customer_demographics on (cs_bill_cdemo_sk = cd_demo_sk)
join household_demographics on (cs_bill_hdemo_sk = hd_demo_sk)
join date_dim d1 on (cs_sold_date_sk = d1.d_date_sk)
join date_dim d2 on (inv_date_sk = d2.d_date_sk)
join date_dim d3 on (cs_ship_date_sk = d3.d_date_sk)
left outer join promotion on (cs_promo_sk=p_promo_sk)
left outer join catalog_returns on (cr_item_sk = cs_item_sk and cr_order_number = cs_order_number)
where d1.d_week_seq = d2.d_week_seq
  and inv_quantity_on_hand < cs_quantity 
  and d3.d_date > d1.d_date + INTERVAL '5' DAY
  and hd_buy_potential = '501-1000'
  and d1.d_year = 1998
  and cd_marital_status = 'W'
group by i_item_desc,w_warehouse_name,d1.d_week_seq
order by total_cnt desc, i_item_desc, w_warehouse_name, d_week_seq
limit 100;

-- end query 78 in stream 2 using template query72.tpl

Index :82
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803211531504g99a3aiihyw_mcqa&token=MmtwanBtV0dXRWVwT2lRN056U3RyM2ZXSmhJPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NjUzNix7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTE1MzE1MDRnOTlhM2FpaWh5d19tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:15:31.474
endtime:2026-08-04 05:15:53.171
Cost time : 21697 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query79.sql
SQL:
-- start query 79 in stream 2 using template query70.tpl
select  
    sum(ss_net_profit) as total_sum
   ,s_state
   ,s_county
   ,grouping(s_state)+grouping(s_county) as lochierarchy
   ,rank() over (
 	partition by grouping(s_state)+grouping(s_county),
 	case when grouping(s_county) = 0 then s_state end 
 	order by sum(ss_net_profit) desc) as rank_within_parent
 from
    store_sales
   ,date_dim       d1
   ,store
 where
    d1.d_month_seq between 1190 and 1190+11
 and d1.d_date_sk = ss_sold_date_sk
 and s_store_sk  = ss_store_sk
 and s_state in
             ( select s_state
               from  (select s_state as s_state,
 			    rank() over ( partition by s_state order by sum(ss_net_profit) desc) as ranking
                      from   store_sales, store, date_dim
                      where  d_month_seq between 1190 and 1190+11
 			    and d_date_sk = ss_sold_date_sk
 			    and s_store_sk  = ss_store_sk
                      group by s_state
                     ) tmp1 
               where ranking <= 5
             )
 group by rollup(s_state,s_county)
 order by
   lochierarchy desc
  ,case when lochierarchy = 0 then s_state end
  ,rank_within_parent
 limit 100;

-- end query 79 in stream 2 using template query70.tpl

Index :83
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803211553202g99a3aiihyz_mcqa&token=NXp6YTJ2OFBLOXVGa0U5MmFJaDVZUGRFOXdNPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NjU1OCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTE1NTMyMDJnOTlhM2FpaWh5el9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:15:53.171
endtime:2026-08-04 05:16:15.562
Cost time : 22391 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query80.sql
SQL:
-- start query 80 in stream 2 using template query7.tpl
select  i_item_id, 
        avg(ss_quantity) agg1,
        avg(ss_list_price) agg2,
        avg(ss_coupon_amt) agg3,
        avg(ss_sales_price) agg4 
 from store_sales, customer_demographics, date_dim, item, promotion
 where ss_sold_date_sk = d_date_sk and
       ss_item_sk = i_item_sk and
       ss_cdemo_sk = cd_demo_sk and
       ss_promo_sk = p_promo_sk and
       cd_gender = 'F' and 
       cd_marital_status = 'S' and
       cd_education_status = '2 yr Degree' and
       (p_channel_email = 'N' or p_channel_event = 'N') and
       d_year = 2002 
 group by i_item_id
 order by i_item_id
 limit 100;

-- end query 80 in stream 2 using template query7.tpl

Index :84
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803211615595g99a3aiihz4_mcqa&token=MktPR1ZTZ0RRSTV0clpQaDNmSHE5M080Y1gwPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NjU4MCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTE2MTU1OTVnOTlhM2FpaWh6NF9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:16:15.562
endtime:2026-08-04 05:16:46.351
Cost time : 30789 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query81.sql
SQL:
-- start query 81 in stream 2 using template query97.tpl
with ssci as (
select ss_customer_sk customer_sk
      ,ss_item_sk item_sk
from store_sales,date_dim
where ss_sold_date_sk = d_date_sk
  and d_month_seq between 1213 and 1213 + 11
group by ss_customer_sk
        ,ss_item_sk),
csci as(
 select cs_bill_customer_sk customer_sk
      ,cs_item_sk item_sk
from catalog_sales,date_dim
where cs_sold_date_sk = d_date_sk
  and d_month_seq between 1213 and 1213 + 11
group by cs_bill_customer_sk
        ,cs_item_sk)
 select  sum(case when ssci.customer_sk is not null and csci.customer_sk is null then 1 else 0 end) store_only
      ,sum(case when ssci.customer_sk is null and csci.customer_sk is not null then 1 else 0 end) catalog_only
      ,sum(case when ssci.customer_sk is not null and csci.customer_sk is not null then 1 else 0 end) store_and_catalog
from ssci full outer join csci on (ssci.customer_sk=csci.customer_sk
                               and ssci.item_sk = csci.item_sk)
limit 100;

-- end query 81 in stream 2 using template query97.tpl

Index :85
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803211646388g99a3aiihz8_mcqa&token=cSt4VzF5dGtQS0dsR285eS81TkdORFRXVUowPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NjYxMSx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTE2NDYzODhnOTlhM2FpaWh6OF9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:16:46.352
endtime:2026-08-04 05:17:00.589
Cost time : 14237 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query82.sql
SQL:
-- start query 82 in stream 2 using template query33.tpl
with ss as (
 select
          i_manufact_id,sum(ss_ext_sales_price) total_sales
 from
 	store_sales,
 	date_dim,
         customer_address,
         item
 where
         i_manufact_id in (select
  i_manufact_id
from
 item
where i_category in ('Electronics'))
 and     ss_item_sk              = i_item_sk
 and     ss_sold_date_sk         = d_date_sk
 and     d_year                  = 2001
 and     d_moy                   = 4
 and     ss_addr_sk              = ca_address_sk
 and     ca_gmt_offset           = -7 
 group by i_manufact_id),
 cs as (
 select
          i_manufact_id,sum(cs_ext_sales_price) total_sales
 from
 	catalog_sales,
 	date_dim,
         customer_address,
         item
 where
         i_manufact_id               in (select
  i_manufact_id
from
 item
where i_category in ('Electronics'))
 and     cs_item_sk              = i_item_sk
 and     cs_sold_date_sk         = d_date_sk
 and     d_year                  = 2001
 and     d_moy                   = 4
 and     cs_bill_addr_sk         = ca_address_sk
 and     ca_gmt_offset           = -7 
 group by i_manufact_id),
 ws as (
 select
          i_manufact_id,sum(ws_ext_sales_price) total_sales
 from
 	web_sales,
 	date_dim,
         customer_address,
         item
 where
         i_manufact_id               in (select
  i_manufact_id
from
 item
where i_category in ('Electronics'))
 and     ws_item_sk              = i_item_sk
 and     ws_sold_date_sk         = d_date_sk
 and     d_year                  = 2001
 and     d_moy                   = 4
 and     ws_bill_addr_sk         = ca_address_sk
 and     ca_gmt_offset           = -7
 group by i_manufact_id)
  select  i_manufact_id ,sum(total_sales) total_sales
 from  (select * from ss 
        union all
        select * from cs 
        union all
        select * from ws) tmp1
 group by i_manufact_id
 order by total_sales
limit 100;

-- end query 82 in stream 2 using template query33.tpl

Index :86
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803211700624g99a3aiihzd_mcqa&token=bDlCNlhrdkR6eUI3Ky9KMnJZejhxSnh0KzVnPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NjYyNSx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTE3MDA2MjRnOTlhM2FpaWh6ZF9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:17:00.590
endtime:2026-08-04 05:17:23.748
Cost time : 23158 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query83.sql
SQL:
-- start query 83 in stream 2 using template query79.tpl
select 
  c_last_name,c_first_name,substr(s_city,1,30),ss_ticket_number,amt,profit
  from
   (select ss_ticket_number
          ,ss_customer_sk
          ,store.s_city
          ,sum(ss_coupon_amt) amt
          ,sum(ss_net_profit) profit
    from store_sales,date_dim,store,household_demographics
    where store_sales.ss_sold_date_sk = date_dim.d_date_sk
    and store_sales.ss_store_sk = store.s_store_sk  
    and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
    and (household_demographics.hd_dep_count = 2 or household_demographics.hd_vehicle_count > 2)
    and date_dim.d_dow = 1
    and date_dim.d_year in (2000,2000+1,2000+2) 
    and store.s_number_employees between 200 and 295
    group by ss_ticket_number,ss_customer_sk,ss_addr_sk,store.s_city) ms,customer
    where ss_customer_sk = c_customer_sk
 order by c_last_name,c_first_name,substr(s_city,1,30), profit
limit 100;

-- end query 83 in stream 2 using template query79.tpl

Index :87
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803211723782g99a3aiihzg_mcqa&token=eTA4OU5BUXNwYUdUZ2kwZVMyejRkSHBMYkM4PSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NjY0OCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTE3MjM3ODJnOTlhM2FpaWh6Z19tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:17:23.749
endtime:2026-08-04 05:17:41.826
Cost time : 18077 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query84.sql
SQL:
-- start query 84 in stream 2 using template query32.tpl
select  sum(cs_ext_discount_amt)  as "excess discount amount" 
from 
   catalog_sales 
   ,item 
   ,date_dim
where
i_manufact_id = 94
and i_item_sk = cs_item_sk 
and d_date between '2000-01-24' and 
        (cast('2000-01-24' as date) + INTERVAL '90' DAY)
and d_date_sk = cs_sold_date_sk 
and cs_ext_discount_amt  
     > ( 
         select 
            1.3 * avg(cs_ext_discount_amt) 
         from 
            catalog_sales 
           ,date_dim
         where 
              cs_item_sk = i_item_sk 
          and d_date between '2000-01-24' and
                             (cast('2000-01-24' as date) + INTERVAL '90' DAY)
          and d_date_sk = cs_sold_date_sk 
      ) 
limit 100;

-- end query 84 in stream 2 using template query32.tpl

Index :88
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803211741858g99a3aiihzl_mcqa&token=M3pHc09IRllvZ2ZNN0NIZ3FVUGFzT3N2YVhVPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NjY2Nix7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTE3NDE4NThnOTlhM2FpaWh6bF9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:17:41.826
endtime:2026-08-04 05:18:00.302
Cost time : 18476 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query85.sql
SQL:
-- start query 85 in stream 2 using template query78.tpl
with ws as
  (select d_year AS ws_sold_year, ws_item_sk,
    ws_bill_customer_sk ws_customer_sk,
    sum(ws_quantity) ws_qty,
    sum(ws_wholesale_cost) ws_wc,
    sum(ws_sales_price) ws_sp
   from web_sales
   left join web_returns on wr_order_number=ws_order_number and ws_item_sk=wr_item_sk
   join date_dim on ws_sold_date_sk = d_date_sk
   where wr_order_number is null
   group by d_year, ws_item_sk, ws_bill_customer_sk
   ),
cs as
  (select d_year AS cs_sold_year, cs_item_sk,
    cs_bill_customer_sk cs_customer_sk,
    sum(cs_quantity) cs_qty,
    sum(cs_wholesale_cost) cs_wc,
    sum(cs_sales_price) cs_sp
   from catalog_sales
   left join catalog_returns on cr_order_number=cs_order_number and cs_item_sk=cr_item_sk
   join date_dim on cs_sold_date_sk = d_date_sk
   where cr_order_number is null
   group by d_year, cs_item_sk, cs_bill_customer_sk
   ),
ss as
  (select d_year AS ss_sold_year, ss_item_sk,
    ss_customer_sk,
    sum(ss_quantity) ss_qty,
    sum(ss_wholesale_cost) ss_wc,
    sum(ss_sales_price) ss_sp
   from store_sales
   left join store_returns on sr_ticket_number=ss_ticket_number and ss_item_sk=sr_item_sk
   join date_dim on ss_sold_date_sk = d_date_sk
   where sr_ticket_number is null
   group by d_year, ss_item_sk, ss_customer_sk
   )
 select 
ss_sold_year, ss_item_sk, ss_customer_sk,
round(ss_qty/(coalesce(ws_qty,0)+coalesce(cs_qty,0)),2) ratio,
ss_qty store_qty, ss_wc store_wholesale_cost, ss_sp store_sales_price,
coalesce(ws_qty,0)+coalesce(cs_qty,0) other_chan_qty,
coalesce(ws_wc,0)+coalesce(cs_wc,0) other_chan_wholesale_cost,
coalesce(ws_sp,0)+coalesce(cs_sp,0) other_chan_sales_price
from ss
left join ws on (ws_sold_year=ss_sold_year and ws_item_sk=ss_item_sk and ws_customer_sk=ss_customer_sk)
left join cs on (cs_sold_year=ss_sold_year and cs_item_sk=ss_item_sk and cs_customer_sk=ss_customer_sk)
where (coalesce(ws_qty,0)>0 or coalesce(cs_qty, 0)>0) and ss_sold_year=1999
order by 
  ss_sold_year, ss_item_sk, ss_customer_sk,
  ss_qty desc, ss_wc desc, ss_sp desc,
  other_chan_qty,
  other_chan_wholesale_cost,
  other_chan_sales_price,
  ratio
limit 100;

-- end query 85 in stream 2 using template query78.tpl

Index :89
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803211800363g99a3aiihzm_mcqa&token=YkVxODJCRis5MkZacXdsWldFMHhZZkIvcWYwPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NjY4NSx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTE4MDAzNjNnOTlhM2FpaWh6bV9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:18:00.303
endtime:2026-08-04 05:18:57.118
Cost time : 56815 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query86.sql
SQL:
-- start query 86 in stream 2 using template query18.tpl
select  i_item_id,
        ca_country,
        ca_state, 
        ca_county,
        avg( cast(cs_quantity as decimal(12,2))) agg1,
        avg( cast(cs_list_price as decimal(12,2))) agg2,
        avg( cast(cs_coupon_amt as decimal(12,2))) agg3,
        avg( cast(cs_sales_price as decimal(12,2))) agg4,
        avg( cast(cs_net_profit as decimal(12,2))) agg5,
        avg( cast(c_birth_year as decimal(12,2))) agg6,
        avg( cast(cd1.cd_dep_count as decimal(12,2))) agg7
 from catalog_sales, customer_demographics cd1, 
      customer_demographics cd2, customer, customer_address, date_dim, item
 where cs_sold_date_sk = d_date_sk and
       cs_item_sk = i_item_sk and
       cs_bill_cdemo_sk = cd1.cd_demo_sk and
       cs_bill_customer_sk = c_customer_sk and
       cd1.cd_gender = 'M' and 
       cd1.cd_education_status = 'Unknown' and
       c_current_cdemo_sk = cd2.cd_demo_sk and
       c_current_addr_sk = ca_address_sk and
       c_birth_month in (4,7,2,10,12,8) and
       d_year = 2001 and
       ca_state in ('KY','VA','SC'
                   ,'OH','MN','MO','MA')
 group by rollup (i_item_id, ca_country, ca_state, ca_county)
 order by ca_country,
        ca_state, 
        ca_county,
	i_item_id
 limit 100;

-- end query 86 in stream 2 using template query18.tpl

Index :90
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803211857150g99a3aiihzt_mcqa&token=SHcxTkxyeis0Z3o1RGNhV2JpZGd3OHExVHFzPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5Njc0Mix7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTE4NTcxNTBnOTlhM2FpaWh6dF9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:18:57.118
endtime:2026-08-04 05:19:24.249
Cost time : 27131 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query87.sql
SQL:
-- start query 87 in stream 2 using template query65.tpl
select 
	s_store_name,
	i_item_desc,
	sc.revenue,
	i_current_price,
	i_wholesale_cost,
	i_brand
 from store, item,
     (select ss_store_sk, avg(revenue) as ave
 	from
 	    (select  ss_store_sk, ss_item_sk, 
 		     sum(ss_sales_price) as revenue
 		from store_sales, date_dim
 		where ss_sold_date_sk = d_date_sk and d_month_seq between 1193 and 1193+11
 		group by ss_store_sk, ss_item_sk) sa
 	group by ss_store_sk) sb,
     (select  ss_store_sk, ss_item_sk, sum(ss_sales_price) as revenue
 	from store_sales, date_dim
 	where ss_sold_date_sk = d_date_sk and d_month_seq between 1193 and 1193+11
 	group by ss_store_sk, ss_item_sk) sc
 where sb.ss_store_sk = sc.ss_store_sk and 
       sc.revenue <= 0.1 * sb.ave and
       s_store_sk = sc.ss_store_sk and
       i_item_sk = sc.ss_item_sk
 order by s_store_name, i_item_desc
limit 100;

-- end query 87 in stream 2 using template query65.tpl

Index :91
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803211924276g99a3aiihzw_mcqa&token=Vkx5NzdPTVZGYVowNE1iQkhNVGhCb0ZtMlJRPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5Njc2OSx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTE5MjQyNzZnOTlhM2FpaWh6d19tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:19:24.250
endtime:2026-08-04 05:19:34.694
Cost time : 10444 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query88.sql
SQL:
-- start query 88 in stream 2 using template query60.tpl
with ss as (
 select
          i_item_id,sum(ss_ext_sales_price) total_sales
 from
 	store_sales,
 	date_dim,
         customer_address,
         item
 where
         i_item_id in (select
  i_item_id
from
 item
where i_category in ('Shoes'))
 and     ss_item_sk              = i_item_sk
 and     ss_sold_date_sk         = d_date_sk
 and     d_year                  = 2001
 and     d_moy                   = 8
 and     ss_addr_sk              = ca_address_sk
 and     ca_gmt_offset           = -6 
 group by i_item_id),
 cs as (
 select
          i_item_id,sum(cs_ext_sales_price) total_sales
 from
 	catalog_sales,
 	date_dim,
         customer_address,
         item
 where
         i_item_id               in (select
  i_item_id
from
 item
where i_category in ('Shoes'))
 and     cs_item_sk              = i_item_sk
 and     cs_sold_date_sk         = d_date_sk
 and     d_year                  = 2001
 and     d_moy                   = 8
 and     cs_bill_addr_sk         = ca_address_sk
 and     ca_gmt_offset           = -6 
 group by i_item_id),
 ws as (
 select
          i_item_id,sum(ws_ext_sales_price) total_sales
 from
 	web_sales,
 	date_dim,
         customer_address,
         item
 where
         i_item_id               in (select
  i_item_id
from
 item
where i_category in ('Shoes'))
 and     ws_item_sk              = i_item_sk
 and     ws_sold_date_sk         = d_date_sk
 and     d_year                  = 2001
 and     d_moy                   = 8
 and     ws_bill_addr_sk         = ca_address_sk
 and     ca_gmt_offset           = -6
 group by i_item_id)
  select   
  i_item_id
,sum(total_sales) total_sales
 from  (select * from ss 
        union all
        select * from cs 
        union all
        select * from ws) tmp1
 group by i_item_id
 order by i_item_id
      ,total_sales
 limit 100;

-- end query 88 in stream 2 using template query60.tpl

Index :92
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803211934725g99a3aiii01_mcqa&token=bXlObWM1VXFlN1NyM1FpZ3ZrS0xGcXg2ZVNNPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5Njc3OSx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTE5MzQ3MjVnOTlhM2FpaWkwMV9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:19:34.694
endtime:2026-08-04 05:20:03.173
Cost time : 28479 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query89.sql
SQL:
-- start query 89 in stream 2 using template query34.tpl
select c_last_name
       ,c_first_name
       ,c_salutation
       ,c_preferred_cust_flag
       ,ss_ticket_number
       ,cnt from
   (select ss_ticket_number
          ,ss_customer_sk
          ,count(*) cnt
    from store_sales,date_dim,store,household_demographics
    where store_sales.ss_sold_date_sk = date_dim.d_date_sk
    and store_sales.ss_store_sk = store.s_store_sk  
    and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
    and (date_dim.d_dom between 1 and 3 or date_dim.d_dom between 25 and 28)
    and (household_demographics.hd_buy_potential = '1001-5000' or
         household_demographics.hd_buy_potential = '0-500')
    and household_demographics.hd_vehicle_count > 0
    and (case when household_demographics.hd_vehicle_count > 0 
	then household_demographics.hd_dep_count/ household_demographics.hd_vehicle_count 
	else null 
	end)  > 1.2
    and date_dim.d_year in (1998,1998+1,1998+2)
    and store.s_county in ('Kittitas County','Cocke County','Karnes County','Carter County',
                           'Cook County','Harmon County','Marion County','Crittenden County')
    group by ss_ticket_number,ss_customer_sk) dn,customer
    where ss_customer_sk = c_customer_sk
      and cnt between 15 and 20
    order by c_last_name,c_first_name,c_salutation,c_preferred_cust_flag desc, ss_ticket_number;

-- end query 89 in stream 2 using template query34.tpl

Index :93
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803212003203g99a3aiii06_mcqa&token=STJVTWtkNmJZQ0pqUkJURUNYbGRJVW9seDM0PSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NjgwOCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTIwMDMyMDNnOTlhM2FpaWkwNl9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:20:03.173
endtime:2026-08-04 05:21:00.700
Cost time : 57527 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query90.sql
SQL:
-- start query 90 in stream 2 using template query3.tpl
select  dt.d_year 
       ,item.i_brand_id brand_id 
       ,item.i_brand brand
       ,sum(ss_sales_price) sum_agg
 from  date_dim dt 
      ,store_sales
      ,item
 where dt.d_date_sk = store_sales.ss_sold_date_sk
   and store_sales.ss_item_sk = item.i_item_sk
   and item.i_manufact_id = 274
   and dt.d_moy=11
 group by dt.d_year
      ,item.i_brand
      ,item.i_brand_id
 order by dt.d_year
         ,sum_agg desc
         ,brand_id
 limit 100;

-- end query 90 in stream 2 using template query3.tpl

Index :94
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803212100735g99a3aiii0d_mcqa&token=aU9ZTUgvUklKUHZGSy95ZHdZNENZNE1EdndjPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5Njg2NSx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTIxMDA3MzVnOTlhM2FpaWkwZF9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:21:00.701
endtime:2026-08-04 05:21:14.725
Cost time : 14024 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query91.sql
SQL:
-- start query 91 in stream 2 using template query13.tpl
select avg(ss_quantity)
       ,avg(ss_ext_sales_price)
       ,avg(ss_ext_wholesale_cost)
       ,sum(ss_ext_wholesale_cost)
 from store_sales
     ,store
     ,customer_demographics
     ,household_demographics
     ,customer_address
     ,date_dim
 where s_store_sk = ss_store_sk
 and  ss_sold_date_sk = d_date_sk and d_year = 2001
 and((ss_hdemo_sk=hd_demo_sk
  and cd_demo_sk = ss_cdemo_sk
  and cd_marital_status = 'S'
  and cd_education_status = 'College'
  and ss_sales_price between 100.00 and 150.00
  and hd_dep_count = 3   
     )or
     (ss_hdemo_sk=hd_demo_sk
  and cd_demo_sk = ss_cdemo_sk
  and cd_marital_status = 'D'
  and cd_education_status = 'Secondary'
  and ss_sales_price between 50.00 and 100.00   
  and hd_dep_count = 1
     ) or 
     (ss_hdemo_sk=hd_demo_sk
  and cd_demo_sk = ss_cdemo_sk
  and cd_marital_status = 'M'
  and cd_education_status = '4 yr Degree'
  and ss_sales_price between 150.00 and 200.00 
  and hd_dep_count = 1  
     ))
 and((ss_addr_sk = ca_address_sk
  and ca_country = 'United States'
  and ca_state in ('TX', 'KY', 'SC')
  and ss_net_profit between 100 and 200  
     ) or
     (ss_addr_sk = ca_address_sk
  and ca_country = 'United States'
  and ca_state in ('MN', 'CO', 'GA')
  and ss_net_profit between 150 and 300  
     ) or
     (ss_addr_sk = ca_address_sk
  and ca_country = 'United States'
  and ca_state in ('WA', 'AL', 'MD')
  and ss_net_profit between 50 and 250  
     ))
;

-- end query 91 in stream 2 using template query13.tpl

Index :95
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803212114751g99a3aiii0g_mcqa&token=TTh0WHVXeHk4VXJuZm1Fd3FiZ3VCTE9BNzI4PSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5Njg3OSx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTIxMTQ3NTFnOTlhM2FpaWkwZ19tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:21:14.725
endtime:2026-08-04 05:21:40.030
Cost time : 25305 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query92.sql
SQL:
-- start query 92 in stream 2 using template query41.tpl
select  distinct(i_product_name)
 from item i1
 where i_manufact_id between 944 and 944+40 
   and (select count(*) as item_cnt
        from item
        where (i_manufact = i1.i_manufact and
        ((i_category = 'Women' and 
        (i_color = 'thistle' or i_color = 'midnight') and 
        (i_units = 'N/A' or i_units = 'Unknown') and
        (i_size = 'petite' or i_size = 'medium')
        ) or
        (i_category = 'Women' and
        (i_color = 'ghost' or i_color = 'lace') and
        (i_units = 'Case' or i_units = 'Oz') and
        (i_size = 'large' or i_size = 'small')
        ) or
        (i_category = 'Men' and
        (i_color = 'cyan' or i_color = 'cornsilk') and
        (i_units = 'Pound' or i_units = 'Cup') and
        (i_size = 'economy' or i_size = 'extra large')
        ) or
        (i_category = 'Men' and
        (i_color = 'almond' or i_color = 'blanched') and
        (i_units = 'Tbl' or i_units = 'Gross') and
        (i_size = 'petite' or i_size = 'medium')
        ))) or
       (i_manufact = i1.i_manufact and
        ((i_category = 'Women' and 
        (i_color = 'peach' or i_color = 'indian') and 
        (i_units = 'Ounce' or i_units = 'Lb') and
        (i_size = 'petite' or i_size = 'medium')
        ) or
        (i_category = 'Women' and
        (i_color = 'olive' or i_color = 'drab') and
        (i_units = 'Bundle' or i_units = 'Bunch') and
        (i_size = 'large' or i_size = 'small')
        ) or
        (i_category = 'Men' and
        (i_color = 'purple' or i_color = 'sky') and
        (i_units = 'Gram' or i_units = 'Dram') and
        (i_size = 'economy' or i_size = 'extra large')
        ) or
        (i_category = 'Men' and
        (i_color = 'burlywood' or i_color = 'rosy') and
        (i_units = 'Ton' or i_units = 'Tsp') and
        (i_size = 'petite' or i_size = 'medium')
        )))) > 0
 order by i_product_name
 limit 100;

-- end query 92 in stream 2 using template query41.tpl

Index :96
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803212140063g99a3aiii0k_mcqa&token=T0VEaENVeHZtVTBzcC9uSU1SNFBERzlrOGpzPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NjkwMSx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTIxNDAwNjNnOTlhM2FpaWkwa19tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:21:40.031
endtime:2026-08-04 05:21:41.599
Cost time : 1568 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query93.sql
SQL:
-- start query 93 in stream 2 using template query92.tpl
select  
   sum(ws_ext_discount_amt)  as "Excess Discount Amount" 
from 
    web_sales 
   ,item 
   ,date_dim
where
i_manufact_id = 854
and i_item_sk = ws_item_sk 
and d_date between '2000-02-24' and 
        (cast('2000-02-24' as date) + INTERVAL  '90' DAY)
and d_date_sk = ws_sold_date_sk  
and ws_ext_discount_amt  
     > ( 
         SELECT 
            1.3 * avg(ws_ext_discount_amt) 
         FROM 
            web_sales 
           ,date_dim
         WHERE 
              ws_item_sk = i_item_sk 
          and d_date between '2000-02-24' and
                             (cast('2000-02-24' as date) + INTERVAL  '90' DAY)
          and d_date_sk = ws_sold_date_sk  
      ) 
order by sum(ws_ext_discount_amt)
limit 100;

-- end query 93 in stream 2 using template query92.tpl

Index :97
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803212141633g99a3aiii0m_mcqa&token=R0FJSU4rUGZ6OEhETjY1ajRhd1drVllyN01RPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NjkwNix7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTIxNDE2MzNnOTlhM2FpaWkwbV9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:21:41.599
endtime:2026-08-04 05:22:01.237
Cost time : 19638 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query94.sql
SQL:
-- start query 94 in stream 2 using template query74.tpl
with year_total as (
 select c_customer_id customer_id
       ,c_first_name customer_first_name
       ,c_last_name customer_last_name
       ,d_year as year
       ,sum(ss_net_paid) year_total
       ,'s' sale_type
 from customer
     ,store_sales
     ,date_dim
 where c_customer_sk = ss_customer_sk
   and ss_sold_date_sk = d_date_sk
   and d_year in (2001,2001+1)
 group by c_customer_id
         ,c_first_name
         ,c_last_name
         ,d_year
 union all
 select c_customer_id customer_id
       ,c_first_name customer_first_name
       ,c_last_name customer_last_name
       ,d_year as year
       ,sum(ws_net_paid) year_total
       ,'w' sale_type
 from customer
     ,web_sales
     ,date_dim
 where c_customer_sk = ws_bill_customer_sk
   and ws_sold_date_sk = d_date_sk
   and d_year in (2001,2001+1)
 group by c_customer_id
         ,c_first_name
         ,c_last_name
         ,d_year
         )
  select 
        t_s_secyear.customer_id, t_s_secyear.customer_first_name, t_s_secyear.customer_last_name
 from year_total t_s_firstyear
     ,year_total t_s_secyear
     ,year_total t_w_firstyear
     ,year_total t_w_secyear
 where t_s_secyear.customer_id = t_s_firstyear.customer_id
         and t_s_firstyear.customer_id = t_w_secyear.customer_id
         and t_s_firstyear.customer_id = t_w_firstyear.customer_id
         and t_s_firstyear.sale_type = 's'
         and t_w_firstyear.sale_type = 'w'
         and t_s_secyear.sale_type = 's'
         and t_w_secyear.sale_type = 'w'
         and t_s_firstyear.year = 2001
         and t_s_secyear.year = 2001+1
         and t_w_firstyear.year = 2001
         and t_w_secyear.year = 2001+1
         and t_s_firstyear.year_total > 0
         and t_w_firstyear.year_total > 0
         and case when t_w_firstyear.year_total > 0 then t_w_secyear.year_total / t_w_firstyear.year_total else null end
           > case when t_s_firstyear.year_total > 0 then t_s_secyear.year_total / t_s_firstyear.year_total else null end
 order by 2,3,1
limit 100;

-- end query 94 in stream 2 using template query74.tpl

Index :98
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803212201273g99a3aiii0o_mcqa&token=UzFHY1Fjc0l2Rk9oOHJuRnBmQWlxUThIWThNPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NjkyNix7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTIyMDEyNzNnOTlhM2FpaWkwb19tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:22:01.237
endtime:2026-08-04 05:22:29.347
Cost time : 28110 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query95.sql
SQL:
-- start query 95 in stream 2 using template query46.tpl
select  c_last_name
       ,c_first_name
       ,ca_city
       ,bought_city
       ,ss_ticket_number
       ,amt,profit 
 from
   (select ss_ticket_number
          ,ss_customer_sk
          ,ca_city bought_city
          ,sum(ss_coupon_amt) amt
          ,sum(ss_net_profit) profit
    from store_sales,date_dim,store,household_demographics,customer_address 
    where store_sales.ss_sold_date_sk = date_dim.d_date_sk
    and store_sales.ss_store_sk = store.s_store_sk  
    and store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
    and store_sales.ss_addr_sk = customer_address.ca_address_sk
    and (household_demographics.hd_dep_count = 0 or
         household_demographics.hd_vehicle_count= 2)
    and date_dim.d_dow in (6,0)
    and date_dim.d_year in (1999,1999+1,1999+2) 
    and store.s_city in ('Lawrence','Mulberry','Glendale','Chestnut Hill','Buckhorn') 
    group by ss_ticket_number,ss_customer_sk,ss_addr_sk,ca_city) dn,customer,customer_address current_addr
    where ss_customer_sk = c_customer_sk
      and customer.c_current_addr_sk = current_addr.ca_address_sk
      and current_addr.ca_city <> bought_city
  order by c_last_name
          ,c_first_name
          ,ca_city
          ,bought_city
          ,ss_ticket_number
  limit 100;

-- end query 95 in stream 2 using template query46.tpl

Index :99
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803212229381g99a3aiii0u_mcqa&token=YURFdkFyTlRHdjhObmtpdjBBWWZNWGFvalIwPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5Njk1NCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTIyMjkzODFnOTlhM2FpaWkwdV9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:22:29.347
endtime:2026-08-04 05:23:03.481
Cost time : 34134 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query96.sql
SQL:
-- start query 96 in stream 2 using template query89.tpl
select  *
from(
select i_category, i_class, i_brand,
       s_store_name, s_company_name,
       d_moy,
       sum(ss_sales_price) sum_sales,
       avg(sum(ss_sales_price)) over
         (partition by i_category, i_brand, s_store_name, s_company_name)
         avg_monthly_sales
from item, store_sales, date_dim, store
where ss_item_sk = i_item_sk and
      ss_sold_date_sk = d_date_sk and
      ss_store_sk = s_store_sk and
      d_year in (2001) and
        ((i_category in ('Sports','Home','Music') and
          i_class in ('outdoor','rugs','rock')
         )
      or (i_category in ('Children','Jewelry','Women') and
          i_class in ('newborn','diamonds','fragrances') 
        ))
group by i_category, i_class, i_brand,
         s_store_name, s_company_name, d_moy) tmp1
where case when (avg_monthly_sales <> 0) then (abs(sum_sales - avg_monthly_sales) / avg_monthly_sales) else null end > 0.1
order by sum_sales - avg_monthly_sales, s_store_name
limit 100;

-- end query 96 in stream 2 using template query89.tpl

Index :100
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803212303511g99a3aiii0y_mcqa&token=M2s3bk5FVjFtbVNhNnRLOG5SaWdUbEZIbmprPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5Njk4OCx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTIzMDM1MTFnOTlhM2FpaWkweV9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:23:03.481
endtime:2026-08-04 05:23:21.356
Cost time : 17875 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query97.sql
SQL:
-- start query 97 in stream 2 using template query47.tpl
with v1 as(
 select i_category, i_brand,
        s_store_name, s_company_name,
        d_year, d_moy,
        sum(ss_sales_price) sum_sales,
        avg(sum(ss_sales_price)) over
          (partition by i_category, i_brand,
                     s_store_name, s_company_name, d_year)
          avg_monthly_sales,
        rank() over
          (partition by i_category, i_brand,
                     s_store_name, s_company_name
           order by d_year, d_moy) rn
 from item, store_sales, date_dim, store
 where ss_item_sk = i_item_sk and
       ss_sold_date_sk = d_date_sk and
       ss_store_sk = s_store_sk and
       (
         d_year = 2001 or
         ( d_year = 2001-1 and d_moy =12) or
         ( d_year = 2001+1 and d_moy =1)
       )
 group by i_category, i_brand,
          s_store_name, s_company_name,
          d_year, d_moy),
 v2 as(
 select v1.i_category
        ,v1.d_year
        ,v1.avg_monthly_sales
        ,v1.sum_sales, v1_lag.sum_sales psum, v1_lead.sum_sales nsum
 from v1, v1 v1_lag, v1 v1_lead
 where v1.i_category = v1_lag.i_category and
       v1.i_category = v1_lead.i_category and
       v1.i_brand = v1_lag.i_brand and
       v1.i_brand = v1_lead.i_brand and
       v1.s_store_name = v1_lag.s_store_name and
       v1.s_store_name = v1_lead.s_store_name and
       v1.s_company_name = v1_lag.s_company_name and
       v1.s_company_name = v1_lead.s_company_name and
       v1.rn = v1_lag.rn + 1 and
       v1.rn = v1_lead.rn - 1)
  select  *
 from v2
 where  d_year = 2001 and    
        avg_monthly_sales > 0 and
        case when avg_monthly_sales > 0 then abs(sum_sales - avg_monthly_sales) / avg_monthly_sales else null end > 0.1
 order by sum_sales - avg_monthly_sales, nsum
 limit 100;

-- end query 97 in stream 2 using template query47.tpl

Index :101
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803212321396g99a3aiii10_mcqa&token=R2tjVnU5TWlCSmp3b1VqNnd1VGVYRFlFU2pBPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NzAwNix7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTIzMjEzOTZnOTlhM2FpaWkxMF9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:23:21.356
endtime:2026-08-04 05:23:34.177
Cost time : 12821 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query98.sql
SQL:
-- start query 98 in stream 2 using template query66.tpl
select   
         w_warehouse_name
 	,w_warehouse_sq_ft
 	,w_city
 	,w_county
 	,w_state
 	,w_country
        ,ship_carriers
        ,year
 	,sum(jan_sales) as jan_sales
 	,sum(feb_sales) as feb_sales
 	,sum(mar_sales) as mar_sales
 	,sum(apr_sales) as apr_sales
 	,sum(may_sales) as may_sales
 	,sum(jun_sales) as jun_sales
 	,sum(jul_sales) as jul_sales
 	,sum(aug_sales) as aug_sales
 	,sum(sep_sales) as sep_sales
 	,sum(oct_sales) as oct_sales
 	,sum(nov_sales) as nov_sales
 	,sum(dec_sales) as dec_sales
 	,sum(jan_sales/w_warehouse_sq_ft) as jan_sales_per_sq_foot
 	,sum(feb_sales/w_warehouse_sq_ft) as feb_sales_per_sq_foot
 	,sum(mar_sales/w_warehouse_sq_ft) as mar_sales_per_sq_foot
 	,sum(apr_sales/w_warehouse_sq_ft) as apr_sales_per_sq_foot
 	,sum(may_sales/w_warehouse_sq_ft) as may_sales_per_sq_foot
 	,sum(jun_sales/w_warehouse_sq_ft) as jun_sales_per_sq_foot
 	,sum(jul_sales/w_warehouse_sq_ft) as jul_sales_per_sq_foot
 	,sum(aug_sales/w_warehouse_sq_ft) as aug_sales_per_sq_foot
 	,sum(sep_sales/w_warehouse_sq_ft) as sep_sales_per_sq_foot
 	,sum(oct_sales/w_warehouse_sq_ft) as oct_sales_per_sq_foot
 	,sum(nov_sales/w_warehouse_sq_ft) as nov_sales_per_sq_foot
 	,sum(dec_sales/w_warehouse_sq_ft) as dec_sales_per_sq_foot
 	,sum(jan_net) as jan_net
 	,sum(feb_net) as feb_net
 	,sum(mar_net) as mar_net
 	,sum(apr_net) as apr_net
 	,sum(may_net) as may_net
 	,sum(jun_net) as jun_net
 	,sum(jul_net) as jul_net
 	,sum(aug_net) as aug_net
 	,sum(sep_net) as sep_net
 	,sum(oct_net) as oct_net
 	,sum(nov_net) as nov_net
 	,sum(dec_net) as dec_net
 from (
     select 
 	w_warehouse_name
 	,w_warehouse_sq_ft
 	,w_city
 	,w_county
 	,w_state
 	,w_country
 	,'TBS' || ',' || 'GERMA' as ship_carriers
       ,d_year as year
 	,sum(case when d_moy = 1 
 		then ws_ext_sales_price* ws_quantity else 0 end) as jan_sales
 	,sum(case when d_moy = 2 
 		then ws_ext_sales_price* ws_quantity else 0 end) as feb_sales
 	,sum(case when d_moy = 3 
 		then ws_ext_sales_price* ws_quantity else 0 end) as mar_sales
 	,sum(case when d_moy = 4 
 		then ws_ext_sales_price* ws_quantity else 0 end) as apr_sales
 	,sum(case when d_moy = 5 
 		then ws_ext_sales_price* ws_quantity else 0 end) as may_sales
 	,sum(case when d_moy = 6 
 		then ws_ext_sales_price* ws_quantity else 0 end) as jun_sales
 	,sum(case when d_moy = 7 
 		then ws_ext_sales_price* ws_quantity else 0 end) as jul_sales
 	,sum(case when d_moy = 8 
 		then ws_ext_sales_price* ws_quantity else 0 end) as aug_sales
 	,sum(case when d_moy = 9 
 		then ws_ext_sales_price* ws_quantity else 0 end) as sep_sales
 	,sum(case when d_moy = 10 
 		then ws_ext_sales_price* ws_quantity else 0 end) as oct_sales
 	,sum(case when d_moy = 11
 		then ws_ext_sales_price* ws_quantity else 0 end) as nov_sales
 	,sum(case when d_moy = 12
 		then ws_ext_sales_price* ws_quantity else 0 end) as dec_sales
 	,sum(case when d_moy = 1 
 		then ws_net_paid_inc_tax * ws_quantity else 0 end) as jan_net
 	,sum(case when d_moy = 2
 		then ws_net_paid_inc_tax * ws_quantity else 0 end) as feb_net
 	,sum(case when d_moy = 3 
 		then ws_net_paid_inc_tax * ws_quantity else 0 end) as mar_net
 	,sum(case when d_moy = 4 
 		then ws_net_paid_inc_tax * ws_quantity else 0 end) as apr_net
 	,sum(case when d_moy = 5 
 		then ws_net_paid_inc_tax * ws_quantity else 0 end) as may_net
 	,sum(case when d_moy = 6 
 		then ws_net_paid_inc_tax * ws_quantity else 0 end) as jun_net
 	,sum(case when d_moy = 7 
 		then ws_net_paid_inc_tax * ws_quantity else 0 end) as jul_net
 	,sum(case when d_moy = 8 
 		then ws_net_paid_inc_tax * ws_quantity else 0 end) as aug_net
 	,sum(case when d_moy = 9 
 		then ws_net_paid_inc_tax * ws_quantity else 0 end) as sep_net
 	,sum(case when d_moy = 10 
 		then ws_net_paid_inc_tax * ws_quantity else 0 end) as oct_net
 	,sum(case when d_moy = 11
 		then ws_net_paid_inc_tax * ws_quantity else 0 end) as nov_net
 	,sum(case when d_moy = 12
 		then ws_net_paid_inc_tax * ws_quantity else 0 end) as dec_net
     from
          web_sales
         ,warehouse
         ,date_dim
         ,time_dim
 	  ,ship_mode
     where
            ws_warehouse_sk =  w_warehouse_sk
        and ws_sold_date_sk = d_date_sk
        and ws_sold_time_sk = t_time_sk
 	and ws_ship_mode_sk = sm_ship_mode_sk
        and d_year = 1999
 	and t_time between 20435 and 20435+28800 
 	and sm_carrier in ('TBS','GERMA')
     group by 
        w_warehouse_name
 	,w_warehouse_sq_ft
 	,w_city
 	,w_county
 	,w_state
 	,w_country
       ,d_year
 union all
     select 
 	w_warehouse_name
 	,w_warehouse_sq_ft
 	,w_city
 	,w_county
 	,w_state
 	,w_country
 	,'TBS' || ',' || 'GERMA' as ship_carriers
       ,d_year as year
 	,sum(case when d_moy = 1 
 		then cs_ext_sales_price* cs_quantity else 0 end) as jan_sales
 	,sum(case when d_moy = 2 
 		then cs_ext_sales_price* cs_quantity else 0 end) as feb_sales
 	,sum(case when d_moy = 3 
 		then cs_ext_sales_price* cs_quantity else 0 end) as mar_sales
 	,sum(case when d_moy = 4 
 		then cs_ext_sales_price* cs_quantity else 0 end) as apr_sales
 	,sum(case when d_moy = 5 
 		then cs_ext_sales_price* cs_quantity else 0 end) as may_sales
 	,sum(case when d_moy = 6 
 		then cs_ext_sales_price* cs_quantity else 0 end) as jun_sales
 	,sum(case when d_moy = 7 
 		then cs_ext_sales_price* cs_quantity else 0 end) as jul_sales
 	,sum(case when d_moy = 8 
 		then cs_ext_sales_price* cs_quantity else 0 end) as aug_sales
 	,sum(case when d_moy = 9 
 		then cs_ext_sales_price* cs_quantity else 0 end) as sep_sales
 	,sum(case when d_moy = 10 
 		then cs_ext_sales_price* cs_quantity else 0 end) as oct_sales
 	,sum(case when d_moy = 11
 		then cs_ext_sales_price* cs_quantity else 0 end) as nov_sales
 	,sum(case when d_moy = 12
 		then cs_ext_sales_price* cs_quantity else 0 end) as dec_sales
 	,sum(case when d_moy = 1 
 		then cs_net_paid_inc_ship * cs_quantity else 0 end) as jan_net
 	,sum(case when d_moy = 2 
 		then cs_net_paid_inc_ship * cs_quantity else 0 end) as feb_net
 	,sum(case when d_moy = 3 
 		then cs_net_paid_inc_ship * cs_quantity else 0 end) as mar_net
 	,sum(case when d_moy = 4 
 		then cs_net_paid_inc_ship * cs_quantity else 0 end) as apr_net
 	,sum(case when d_moy = 5 
 		then cs_net_paid_inc_ship * cs_quantity else 0 end) as may_net
 	,sum(case when d_moy = 6 
 		then cs_net_paid_inc_ship * cs_quantity else 0 end) as jun_net
 	,sum(case when d_moy = 7 
 		then cs_net_paid_inc_ship * cs_quantity else 0 end) as jul_net
 	,sum(case when d_moy = 8 
 		then cs_net_paid_inc_ship * cs_quantity else 0 end) as aug_net
 	,sum(case when d_moy = 9 
 		then cs_net_paid_inc_ship * cs_quantity else 0 end) as sep_net
 	,sum(case when d_moy = 10 
 		then cs_net_paid_inc_ship * cs_quantity else 0 end) as oct_net
 	,sum(case when d_moy = 11
 		then cs_net_paid_inc_ship * cs_quantity else 0 end) as nov_net
 	,sum(case when d_moy = 12
 		then cs_net_paid_inc_ship * cs_quantity else 0 end) as dec_net
     from
          catalog_sales
         ,warehouse
         ,date_dim
         ,time_dim
 	 ,ship_mode
     where
            cs_warehouse_sk =  w_warehouse_sk
        and cs_sold_date_sk = d_date_sk
        and cs_sold_time_sk = t_time_sk
 	and cs_ship_mode_sk = sm_ship_mode_sk
        and d_year = 1999
 	and t_time between 20435 AND 20435+28800 
 	and sm_carrier in ('TBS','GERMA')
     group by 
        w_warehouse_name
 	,w_warehouse_sq_ft
 	,w_city
 	,w_county
 	,w_state
 	,w_country
       ,d_year
 ) x
 group by 
        w_warehouse_name
 	,w_warehouse_sq_ft
 	,w_city
 	,w_county
 	,w_state
 	,w_country
 	,ship_carriers
       ,year
 order by w_warehouse_name
 limit 100;

-- end query 98 in stream 2 using template query66.tpl

Index :102
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803212334214g99a3aiii11_mcqa&token=Q0ZZenVIa1dIZU9xNjM4TU53SmFyTnZ0YnpVPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NzAxOSx7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTIzMzQyMTRnOTlhM2FpaWkxMV9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:23:34.178
endtime:2026-08-04 05:23:41.112
Cost time : 6934 ms

fileName: /apsarapangu/disk8/hanying.hy/clt_new/tpc_benchmark/tpc-ds/log/queries/stream_2/query99.sql
SQL:
-- start query 99 in stream 2 using template query48.tpl
select sum (ss_quantity)
 from store_sales, store, customer_demographics, customer_address, date_dim
 where s_store_sk = ss_store_sk
 and  ss_sold_date_sk = d_date_sk and d_year = 2000
 and  
 (
  (
   cd_demo_sk = ss_cdemo_sk
   and 
   cd_marital_status = 'D'
   and 
   cd_education_status = 'Secondary'
   and 
   ss_sales_price between 100.00 and 150.00  
   )
 or
  (
  cd_demo_sk = ss_cdemo_sk
   and 
   cd_marital_status = 'W'
   and 
   cd_education_status = '2 yr Degree'
   and 
   ss_sales_price between 50.00 and 100.00   
  )
 or 
 (
  cd_demo_sk = ss_cdemo_sk
  and 
   cd_marital_status = 'M'
   and 
   cd_education_status = 'College'
   and 
   ss_sales_price between 150.00 and 200.00  
 )
 )
 and
 (
  (
  ss_addr_sk = ca_address_sk
  and
  ca_country = 'United States'
  and
  ca_state in ('KS', 'MI', 'OK')
  and ss_net_profit between 0 and 2000  
  )
 or
  (ss_addr_sk = ca_address_sk
  and
  ca_country = 'United States'
  and
  ca_state in ('LA', 'NY', 'MO')
  and ss_net_profit between 150 and 3000 
  )
 or
  (ss_addr_sk = ca_address_sk
  and
  ca_country = 'United States'
  and
  ca_state in ('IL', 'KY', 'CO')
  and ss_net_profit between 50 and 25000 
  )
 )
;

-- end query 99 in stream 2 using template query48.tpl

Index :103
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.cn-shanghai.maxcompute.aliyun.com/api&p=tpcds_benchmark_on_ecs&i=20260803212341147g99a3aiii12_mcqa&token=dy8wVFlqelpCMUZHbzN1bHAxWmlISFVuVnJVPSxPRFBTX09CTzpwNF8yMDQ1Mjk3NzAxMDcxMjQ2ODgsMTc4NjM5NzAyNix7IlN0YXRlbWVudCI6W3siQWN0aW9uIjpbIm9kcHM6UmVhZCJdLCJFZmZlY3QiOiJBbGxvdyIsIlJlc291cmNlIjpbImFjczpvZHBzOio6cHJvamVjdHMvdHBjZHNfYmVuY2htYXJrX29uX2Vjcy9pbnN0YW5jZXMvMjAyNjA4MDMyMTIzNDExNDdnOTlhM2FpaWkxMl9tY3FhIl19XSwiVmVyc2lvbiI6IjEifQ==
starttime:2026-08-04 05:23:41.112
endtime:2026-08-04 05:23:47.452
Cost time : 6340 ms

