Skip to content

Commit 72525ef

Browse files
authored
Fix q66 (make it same as yql version) (#4543)
1 parent 58b04a5 commit 72525ef

File tree

1 file changed

+36
-36
lines changed
  • ydb/library/benchmarks/queries/tpcds/pg

1 file changed

+36
-36
lines changed

ydb/library/benchmarks/queries/tpcds/pg/q66.sql

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -80,29 +80,29 @@ select
8080
,sum(case when d_moy = 12
8181
then ws_sales_price* ws_quantity::numeric else 0::numeric end) as dec_sales
8282
,sum(case when d_moy = 1
83-
then ws_net_paid_inc_tax * ws_quantity::numeric else 0::numeric end) as jan_net
83+
then ws_net_paid_inc_ship_tax * ws_quantity::numeric else 0::numeric end) as jan_net
8484
,sum(case when d_moy = 2
85-
then ws_net_paid_inc_tax * ws_quantity::numeric else 0::numeric end) as feb_net
85+
then ws_net_paid_inc_ship_tax * ws_quantity::numeric else 0::numeric end) as feb_net
8686
,sum(case when d_moy = 3
87-
then ws_net_paid_inc_tax * ws_quantity::numeric else 0::numeric end) as mar_net
87+
then ws_net_paid_inc_ship_tax * ws_quantity::numeric else 0::numeric end) as mar_net
8888
,sum(case when d_moy = 4
89-
then ws_net_paid_inc_tax * ws_quantity::numeric else 0::numeric end) as apr_net
89+
then ws_net_paid_inc_ship_tax * ws_quantity::numeric else 0::numeric end) as apr_net
9090
,sum(case when d_moy = 5
91-
then ws_net_paid_inc_tax * ws_quantity::numeric else 0::numeric end) as may_net
91+
then ws_net_paid_inc_ship_tax * ws_quantity::numeric else 0::numeric end) as may_net
9292
,sum(case when d_moy = 6
93-
then ws_net_paid_inc_tax * ws_quantity::numeric else 0::numeric end) as jun_net
93+
then ws_net_paid_inc_ship_tax * ws_quantity::numeric else 0::numeric end) as jun_net
9494
,sum(case when d_moy = 7
95-
then ws_net_paid_inc_tax * ws_quantity::numeric else 0::numeric end) as jul_net
95+
then ws_net_paid_inc_ship_tax * ws_quantity::numeric else 0::numeric end) as jul_net
9696
,sum(case when d_moy = 8
97-
then ws_net_paid_inc_tax * ws_quantity::numeric else 0::numeric end) as aug_net
97+
then ws_net_paid_inc_ship_tax * ws_quantity::numeric else 0::numeric end) as aug_net
9898
,sum(case when d_moy = 9
99-
then ws_net_paid_inc_tax * ws_quantity::numeric else 0::numeric end) as sep_net
99+
then ws_net_paid_inc_ship_tax * ws_quantity::numeric else 0::numeric end) as sep_net
100100
,sum(case when d_moy = 10
101-
then ws_net_paid_inc_tax * ws_quantity::numeric else 0::numeric end) as oct_net
101+
then ws_net_paid_inc_ship_tax * ws_quantity::numeric else 0::numeric end) as oct_net
102102
,sum(case when d_moy = 11
103-
then ws_net_paid_inc_tax * ws_quantity::numeric else 0::numeric end) as nov_net
103+
then ws_net_paid_inc_ship_tax * ws_quantity::numeric else 0::numeric end) as nov_net
104104
,sum(case when d_moy = 12
105-
then ws_net_paid_inc_tax * ws_quantity::numeric else 0::numeric end) as dec_net
105+
then ws_net_paid_inc_ship_tax * ws_quantity::numeric else 0::numeric end) as dec_net
106106
from
107107
{{web_sales}}
108108
,{{warehouse}}
@@ -136,53 +136,53 @@ select
136136
,'MSC' || ',' || 'GERMA' as ship_carriers
137137
,d_year as year
138138
,sum(case when d_moy = 1
139-
then cs_ext_sales_price* cs_quantity::numeric else 0::numeric end) as jan_sales
139+
then cs_ext_list_price* cs_quantity::numeric else 0::numeric end) as jan_sales
140140
,sum(case when d_moy = 2
141-
then cs_ext_sales_price* cs_quantity::numeric else 0::numeric end) as feb_sales
141+
then cs_ext_list_price* cs_quantity::numeric else 0::numeric end) as feb_sales
142142
,sum(case when d_moy = 3
143-
then cs_ext_sales_price* cs_quantity::numeric else 0::numeric end) as mar_sales
143+
then cs_ext_list_price* cs_quantity::numeric else 0::numeric end) as mar_sales
144144
,sum(case when d_moy = 4
145-
then cs_ext_sales_price* cs_quantity::numeric else 0::numeric end) as apr_sales
145+
then cs_ext_list_price* cs_quantity::numeric else 0::numeric end) as apr_sales
146146
,sum(case when d_moy = 5
147-
then cs_ext_sales_price* cs_quantity::numeric else 0::numeric end) as may_sales
147+
then cs_ext_list_price* cs_quantity::numeric else 0::numeric end) as may_sales
148148
,sum(case when d_moy = 6
149-
then cs_ext_sales_price* cs_quantity::numeric else 0::numeric end) as jun_sales
149+
then cs_ext_list_price* cs_quantity::numeric else 0::numeric end) as jun_sales
150150
,sum(case when d_moy = 7
151-
then cs_ext_sales_price* cs_quantity::numeric else 0::numeric end) as jul_sales
151+
then cs_ext_list_price* cs_quantity::numeric else 0::numeric end) as jul_sales
152152
,sum(case when d_moy = 8
153-
then cs_ext_sales_price* cs_quantity::numeric else 0::numeric end) as aug_sales
153+
then cs_ext_list_price* cs_quantity::numeric else 0::numeric end) as aug_sales
154154
,sum(case when d_moy = 9
155-
then cs_ext_sales_price* cs_quantity::numeric else 0::numeric end) as sep_sales
155+
then cs_ext_list_price* cs_quantity::numeric else 0::numeric end) as sep_sales
156156
,sum(case when d_moy = 10
157-
then cs_ext_sales_price* cs_quantity::numeric else 0::numeric end) as oct_sales
157+
then cs_ext_list_price* cs_quantity::numeric else 0::numeric end) as oct_sales
158158
,sum(case when d_moy = 11
159-
then cs_ext_sales_price* cs_quantity::numeric else 0::numeric end) as nov_sales
159+
then cs_ext_list_price* cs_quantity::numeric else 0::numeric end) as nov_sales
160160
,sum(case when d_moy = 12
161-
then cs_ext_sales_price* cs_quantity::numeric else 0::numeric end) as dec_sales
161+
then cs_ext_list_price* cs_quantity::numeric else 0::numeric end) as dec_sales
162162
,sum(case when d_moy = 1
163-
then cs_net_paid_inc_ship_tax * cs_quantity::numeric else 0::numeric end) as jan_net
163+
then cs_net_paid_inc_ship * cs_quantity::numeric else 0::numeric end) as jan_net
164164
,sum(case when d_moy = 2
165-
then cs_net_paid_inc_ship_tax * cs_quantity::numeric else 0::numeric end) as feb_net
165+
then cs_net_paid_inc_ship * cs_quantity::numeric else 0::numeric end) as feb_net
166166
,sum(case when d_moy = 3
167-
then cs_net_paid_inc_ship_tax * cs_quantity::numeric else 0::numeric end) as mar_net
167+
then cs_net_paid_inc_ship * cs_quantity::numeric else 0::numeric end) as mar_net
168168
,sum(case when d_moy = 4
169-
then cs_net_paid_inc_ship_tax * cs_quantity::numeric else 0::numeric end) as apr_net
169+
then cs_net_paid_inc_ship * cs_quantity::numeric else 0::numeric end) as apr_net
170170
,sum(case when d_moy = 5
171-
then cs_net_paid_inc_ship_tax * cs_quantity::numeric else 0::numeric end) as may_net
171+
then cs_net_paid_inc_ship * cs_quantity::numeric else 0::numeric end) as may_net
172172
,sum(case when d_moy = 6
173-
then cs_net_paid_inc_ship_tax * cs_quantity::numeric else 0::numeric end) as jun_net
173+
then cs_net_paid_inc_ship * cs_quantity::numeric else 0::numeric end) as jun_net
174174
,sum(case when d_moy = 7
175-
then cs_net_paid_inc_ship_tax * cs_quantity::numeric else 0::numeric end) as jul_net
175+
then cs_net_paid_inc_ship * cs_quantity::numeric else 0::numeric end) as jul_net
176176
,sum(case when d_moy = 8
177-
then cs_net_paid_inc_ship_tax * cs_quantity::numeric else 0::numeric end) as aug_net
177+
then cs_net_paid_inc_ship * cs_quantity::numeric else 0::numeric end) as aug_net
178178
,sum(case when d_moy = 9
179-
then cs_net_paid_inc_ship_tax * cs_quantity::numeric else 0::numeric end) as sep_net
179+
then cs_net_paid_inc_ship * cs_quantity::numeric else 0::numeric end) as sep_net
180180
,sum(case when d_moy = 10
181-
then cs_net_paid_inc_ship_tax * cs_quantity::numeric else 0::numeric end) as oct_net
181+
then cs_net_paid_inc_ship * cs_quantity::numeric else 0::numeric end) as oct_net
182182
,sum(case when d_moy = 11
183-
then cs_net_paid_inc_ship_tax * cs_quantity::numeric else 0::numeric end) as nov_net
183+
then cs_net_paid_inc_ship * cs_quantity::numeric else 0::numeric end) as nov_net
184184
,sum(case when d_moy = 12
185-
then cs_net_paid_inc_ship_tax * cs_quantity::numeric else 0::numeric end) as dec_net
185+
then cs_net_paid_inc_ship * cs_quantity::numeric else 0::numeric end) as dec_net
186186
from
187187
{{catalog_sales}}
188188
,{{warehouse}}

0 commit comments

Comments
 (0)