Challenge - 5 Problems
Credit Usage Monitoring Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
Querying total credits used by a Snowflake warehouse
What is the output of this query that sums the credits used by warehouse 'COMPUTE_WH' in the last 7 days?
Snowflake
SELECT SUM(CREDITS_USED) AS TOTAL_CREDITS FROM SNOWFLAKE.ACCOUNT_USAGE.WAREHOUSE_METERING_HISTORY WHERE WAREHOUSE_NAME = 'COMPUTE_WH' AND START_TIME >= DATEADD(day, -7, CURRENT_TIMESTAMP());
Attempts:
2 left
💡 Hint
Check the aggregation and filtering by warehouse and date range.
✗ Incorrect
The query sums the CREDITS_USED column filtered by warehouse name and start time within the last 7 days, returning a single row with the total credits.
🧠 Conceptual
intermediate1:30remaining
Understanding Snowflake credit billing granularity
Which statement correctly describes how Snowflake bills credits for warehouses?
Attempts:
2 left
💡 Hint
Think about how Snowflake charges for compute time.
✗ Incorrect
Snowflake bills warehouse credits per second with a minimum of 60 seconds per usage period, so short runs less than a minute still cost one minute of credits.
❓ Troubleshoot
advanced2:00remaining
Diagnosing missing credit usage data in ACCOUNT_USAGE
You run this query to check credit usage but get no rows returned:
SELECT * FROM SNOWFLAKE.ACCOUNT_USAGE.WAREHOUSE_METERING_HISTORY WHERE START_TIME > CURRENT_DATE - 1;
What is the most likely reason?
Attempts:
2 left
💡 Hint
Consider data availability delays in Snowflake's monitoring views.
✗ Incorrect
Snowflake ACCOUNT_USAGE views have a delay of up to 45 minutes before data appears, so very recent usage may not be visible immediately.
🔀 Workflow
advanced2:30remaining
Automating credit usage alerts with Snowflake tasks
Which sequence correctly describes how to automate daily credit usage alerts using Snowflake tasks and notifications?
Attempts:
2 left
💡 Hint
Think about the logical order of creating queries, scheduling, storing, and notifying.
✗ Incorrect
First create the query, then schedule it with a task, store results, and finally trigger notifications based on stored data.
✅ Best Practice
expert3:00remaining
Optimizing credit usage monitoring for cost control
Which approach best helps minimize credit usage while maintaining accurate monitoring of warehouse consumption?
Attempts:
2 left
💡 Hint
Balance monitoring frequency with cost impact.
✗ Incorrect
Running queries hourly and aggregating daily reduces compute cost while keeping monitoring timely enough for cost control.