sf-samples
sf-samples copied to clipboard
Summing time instead of counting
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.