blob: efe0f22ad6b86f1282b37f33d375bbf907283b38 [file] [log] [blame]
====
---- QUERY: TPCDS-Q43
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 = -5
and d_year = 2000
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;
---- RESULTS
'able','AAAAAAAACAAAAAAA',517884.59,469230.50,505832.67,443696.30,479716.97,462447.50,503064.60
'ation','AAAAAAAAHAAAAAAA',508811.68,474290.02,448808.84,492870.99,498127.64,474355.89,505906.68
'bar','AAAAAAAAKAAAAAAA',496021.80,459933.01,479825.96,474630.24,482326.79,478330.87,505252.22
'eing','AAAAAAAAIAAAAAAA',498752.97,476119.01,485965.24,454921.28,491953.89,476014.69,484633.67
'ese','AAAAAAAAEAAAAAAA',493724.01,499637.85,452314.62,466232.23,481922.38,477933.29,500577.95
'ought','AAAAAAAABAAAAAAA',505735.34,471490.23,463248.39,482690.52,485818.98,481816.20,491354.68
---- TYPES
STRING, STRING, DECIMAL, DECIMAL, DECIMAL, DECIMAL, DECIMAL, DECIMAL, DECIMAL
====