diff options
Diffstat (limited to 'src/s3select/TPCDS/sample-queries-tpcds/query93.sql')
-rw-r--r-- | src/s3select/TPCDS/sample-queries-tpcds/query93.sql | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/s3select/TPCDS/sample-queries-tpcds/query93.sql b/src/s3select/TPCDS/sample-queries-tpcds/query93.sql new file mode 100644 index 000000000..ed0b427df --- /dev/null +++ b/src/s3select/TPCDS/sample-queries-tpcds/query93.sql @@ -0,0 +1,18 @@ +-- start query 1 in stream 0 using template query93.tpl and seed 1200409435 +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 66') t + group by ss_customer_sk + order by sumsales, ss_customer_sk +limit 100; + +-- end query 1 in stream 0 using template query93.tpl |