sf-samples icon indicating copy to clipboard operation
sf-samples copied to clipboard

Summing time instead of counting

Open sfc-gh-ckite opened this issue 1 year ago • 0 comments

https://github.com/Snowflake-Labs/sf-samples/blob/04a41201c5dc0cff81a7c0e62822cfe287bcc45c/samples/workload-optimization-queries/AccountUsage/Performance/PERF-AU-04-query-type-bucket.sql#L113

It seems like the THEN condition in this line should be 1 instead of TOTAL_ELAPSED_TIME. As written, the query is counting all the other buckets, but summing time for the first one.

sfc-gh-ckite avatar Jul 25 '23 18:07 sfc-gh-ckite