diff --git a/ydb/library/benchmarks/queries/tpcds/pg/q32.sql b/ydb/library/benchmarks/queries/tpcds/pg/q32.sql index c12057992911..17c1252cfbf2 100644 --- a/ydb/library/benchmarks/queries/tpcds/pg/q32.sql +++ b/ydb/library/benchmarks/queries/tpcds/pg/q32.sql @@ -6,7 +6,7 @@ from ,{{item}} ,{{date_dim}} where -i_manufact_id = 269 +i_manufact_id = 66 and i_item_sk = cs_item_sk and d_date between '2002-03-29'::date and (cast('2002-03-29' as date) + interval '90' day)::date diff --git a/ydb/library/benchmarks/queries/tpcds/pg/q33.sql b/ydb/library/benchmarks/queries/tpcds/pg/q33.sql index 3452dd066bea..f84146625ffa 100644 --- a/ydb/library/benchmarks/queries/tpcds/pg/q33.sql +++ b/ydb/library/benchmarks/queries/tpcds/pg/q33.sql @@ -55,7 +55,7 @@ where i_category in ('Books')) i_manufact_id from {{item}} -where i_category in ('Books')) +where i_category in ('Home')) and ws_item_sk = i_item_sk and ws_sold_date_sk = d_date_sk and d_year = 1998 diff --git a/ydb/library/benchmarks/queries/tpcds/pg/q45.sql b/ydb/library/benchmarks/queries/tpcds/pg/q45.sql index a9f445475c48..6245e193ba8e 100644 --- a/ydb/library/benchmarks/queries/tpcds/pg/q45.sql +++ b/ydb/library/benchmarks/queries/tpcds/pg/q45.sql @@ -13,7 +13,7 @@ select ca_zip, ca_county, sum(ws_sales_price) ) ) and ws_sold_date_sk = d_date_sk - and d_qoy = 2 and d_year = 1998 + and d_qoy = 1 and d_year = 1998 group by ca_zip, ca_county order by ca_zip, ca_county limit 100; diff --git a/ydb/library/benchmarks/queries/tpcds/pg/q46.sql b/ydb/library/benchmarks/queries/tpcds/pg/q46.sql index 8f0d286c680d..a55796a00847 100644 --- a/ydb/library/benchmarks/queries/tpcds/pg/q46.sql +++ b/ydb/library/benchmarks/queries/tpcds/pg/q46.sql @@ -17,8 +17,8 @@ select c_last_name 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 = 5 or - household_demographics.hd_vehicle_count= 3) + and (household_demographics.hd_dep_count = 0 or + household_demographics.hd_vehicle_count= 1) and date_dim.d_dow in (6,0) and date_dim.d_year in (2000,2000+1,2000+2) and store.s_city in ('Five Forks','Oakland','Fairview','Winchester','Farmington') diff --git a/ydb/library/benchmarks/queries/tpcds/pg/q59.sql b/ydb/library/benchmarks/queries/tpcds/pg/q59.sql index 7db3c6257a8f..5a16eaed60dd 100644 --- a/ydb/library/benchmarks/queries/tpcds/pg/q59.sql +++ b/ydb/library/benchmarks/queries/tpcds/pg/q59.sql @@ -27,7 +27,7 @@ with wss as 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 1185 and 1185 + 11) y, + d_month_seq between 1205 and 1205 + 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 diff --git a/ydb/library/benchmarks/queries/tpcds/pg/q66.sql b/ydb/library/benchmarks/queries/tpcds/pg/q66.sql index c87ec6538264..e3e0ad399a31 100644 --- a/ydb/library/benchmarks/queries/tpcds/pg/q66.sql +++ b/ydb/library/benchmarks/queries/tpcds/pg/q66.sql @@ -194,8 +194,8 @@ select 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 = 2002 - and t_time between 49530 AND 49530+28800 + and d_year = 2001 + and t_time between 9453 AND 9453+28800 and sm_carrier in ('MSC','GERMA') group by w_warehouse_name diff --git a/ydb/library/benchmarks/queries/tpcds/pg/q82.sql b/ydb/library/benchmarks/queries/tpcds/pg/q82.sql index 3fce72f30685..028261af9198 100644 --- a/ydb/library/benchmarks/queries/tpcds/pg/q82.sql +++ b/ydb/library/benchmarks/queries/tpcds/pg/q82.sql @@ -8,7 +8,7 @@ select i_item_id and inv_item_sk = i_item_sk and d_date_sk=inv_date_sk and d_date between cast('2001-01-28' as date) and (cast('2001-01-28' as date) + interval '60' day)::date - and i_manufact_id in (437,129,727,663) + and i_manufact_id in (80,675,292,17) 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 diff --git a/ydb/library/benchmarks/queries/tpcds/pg/q88.sql b/ydb/library/benchmarks/queries/tpcds/pg/q88.sql index 1374d8cdcd2a..7f2217e3720b 100644 --- a/ydb/library/benchmarks/queries/tpcds/pg/q88.sql +++ b/ydb/library/benchmarks/queries/tpcds/pg/q88.sql @@ -4,69 +4,69 @@ 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 + 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 = 3 and household_demographics.hd_vehicle_count<=3+2) or - (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or - (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2)) + and ((household_demographics.hd_dep_count = 2 and household_demographics.hd_vehicle_count<=2+2) or + (household_demographics.hd_dep_count = 4 and household_demographics.hd_vehicle_count<=4+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 + (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 ss_store_sk = s_store_sk + and time_dim.t_hour = 9 and time_dim.t_minute < 30 - and ((household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2) or - (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or - (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2)) + and ((household_demographics.hd_dep_count = 2 and household_demographics.hd_vehicle_count<=2+2) or + (household_demographics.hd_dep_count = 4 and household_demographics.hd_vehicle_count<=4+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 + (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 = 3 and household_demographics.hd_vehicle_count<=3+2) or - (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or - (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2)) + and ((household_demographics.hd_dep_count = 2 and household_demographics.hd_vehicle_count<=3+2) or + (household_demographics.hd_dep_count = 4 and household_demographics.hd_vehicle_count<=4+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_hour = 10 and time_dim.t_minute < 30 - and ((household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2) or - (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or - (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2)) + and ((household_demographics.hd_dep_count = 2 and household_demographics.hd_vehicle_count<=2+2) or + (household_demographics.hd_dep_count = 4 and household_demographics.hd_vehicle_count<=4+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_hour = 10 and time_dim.t_minute >= 30 - and ((household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2) or - (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or - (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2)) + and ((household_demographics.hd_dep_count = 2 and household_demographics.hd_vehicle_count<=2+2) or + (household_demographics.hd_dep_count = 4 and household_demographics.hd_vehicle_count<=4+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 ss_store_sk = s_store_sk and time_dim.t_hour = 11 and time_dim.t_minute < 30 - and ((household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2) or - (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or - (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2)) + and ((household_demographics.hd_dep_count = 2 and household_demographics.hd_vehicle_count<=2+2) or + (household_demographics.hd_dep_count = 4 and household_demographics.hd_vehicle_count<=4+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}} @@ -75,9 +75,9 @@ from 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 = 3 and household_demographics.hd_vehicle_count<=3+2) or - (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or - (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2)) + and ((household_demographics.hd_dep_count = 2 and household_demographics.hd_vehicle_count<=2+2) or + (household_demographics.hd_dep_count = 4 and household_demographics.hd_vehicle_count<=4+2) or + (household_demographics.hd_dep_count = 4 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}} @@ -86,9 +86,9 @@ from 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 = 3 and household_demographics.hd_vehicle_count<=3+2) or - (household_demographics.hd_dep_count = 0 and household_demographics.hd_vehicle_count<=0+2) or - (household_demographics.hd_dep_count = 1 and household_demographics.hd_vehicle_count<=1+2)) + and ((household_demographics.hd_dep_count = 2 and household_demographics.hd_vehicle_count<=2+2) or + (household_demographics.hd_dep_count = 4 and household_demographics.hd_vehicle_count<=4+2) or + (household_demographics.hd_dep_count = 3 and household_demographics.hd_vehicle_count<=3+2)) and store.s_store_name = 'ese') s8 ;