From e6918187568dbd01842d8d1d2c808ce16a894239 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 21 Apr 2024 13:54:28 +0200 Subject: Adding upstream version 18.2.2. Signed-off-by: Daniel Baumann --- src/s3select/TPCDS/sample-queries-tpcds/query6.sql | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/s3select/TPCDS/sample-queries-tpcds/query6.sql (limited to 'src/s3select/TPCDS/sample-queries-tpcds/query6.sql') diff --git a/src/s3select/TPCDS/sample-queries-tpcds/query6.sql b/src/s3select/TPCDS/sample-queries-tpcds/query6.sql new file mode 100644 index 000000000..21a8a618c --- /dev/null +++ b/src/s3select/TPCDS/sample-queries-tpcds/query6.sql @@ -0,0 +1,26 @@ +-- start query 1 in stream 0 using template query6.tpl and seed 1819994127 +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 = 2002 + and d_moy = 3 ) + 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 1 in stream 0 using template query6.tpl -- cgit v1.2.3