Adds an optional version of the SS_MAX query (#137)

* Adds an optional `ss_max` query without the count distinct to avoid a `hashAggregate` and make it more I/O intensive.

* File rename (removed underscore)

* Removing duplicate file `ss_max_b.sql` as suggested by review.
This commit is contained in:
Nico Poggi 2018-09-10 22:54:02 +02:00 committed by GitHub
parent bf55bdb987
commit 8bbeae664d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,14 @@
select
count(*) as total,
count(ss_sold_date_sk) as not_null_total,
--count(distinct ss_sold_date_sk) as unique_days,
max(ss_sold_date_sk) as max_ss_sold_date_sk,
max(ss_sold_time_sk) as max_ss_sold_time_sk,
max(ss_item_sk) as max_ss_item_sk,
max(ss_customer_sk) as max_ss_customer_sk,
max(ss_cdemo_sk) as max_ss_cdemo_sk,
max(ss_hdemo_sk) as max_ss_hdemo_sk,
max(ss_addr_sk) as max_ss_addr_sk,
max(ss_store_sk) as max_ss_store_sk,
max(ss_promo_sk) as max_ss_promo_sk
from store_sales