0
0
Snowflakecloud~20 mins

Credit usage monitoring in Snowflake - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Credit Usage Monitoring Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
2: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());
AAn empty result because START_TIME filter is invalid
BMultiple rows listing credits used per day for COMPUTE_WH in the last 7 days
CAn error because WAREHOUSE_NAME is case sensitive and should be lowercase
DA single row with TOTAL_CREDITS showing the sum of credits used in the last 7 days for COMPUTE_WH
Attempts:
2 left
💡 Hint
Check the aggregation and filtering by warehouse and date range.
🧠 Conceptual
intermediate
1:30remaining
Understanding Snowflake credit billing granularity
Which statement correctly describes how Snowflake bills credits for warehouses?
ACredits are billed per second with a minimum of 60 seconds per warehouse usage
BCredits are billed per query executed regardless of warehouse size
CCredits are billed per hour regardless of actual usage time
DCredits are billed only when data is stored, not when warehouses run
Attempts:
2 left
💡 Hint
Think about how Snowflake charges for compute time.
Troubleshoot
advanced
2: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?
AThe warehouse has not used any credits in the last day, so no data exists
BThe query syntax is invalid because CURRENT_DATE cannot be used in WHERE clause
CThe ACCOUNT_USAGE views have a latency of up to 45 minutes, so recent data may not appear yet
DThe user running the query lacks privileges to see ACCOUNT_USAGE data
Attempts:
2 left
💡 Hint
Consider data availability delays in Snowflake's monitoring views.
🔀 Workflow
advanced
2:30remaining
Automating credit usage alerts with Snowflake tasks
Which sequence correctly describes how to automate daily credit usage alerts using Snowflake tasks and notifications?
A3,1,2,4
B1,2,3,4
C2,1,3,4
D1,3,2,4
Attempts:
2 left
💡 Hint
Think about the logical order of creating queries, scheduling, storing, and notifying.
Best Practice
expert
3:00remaining
Optimizing credit usage monitoring for cost control
Which approach best helps minimize credit usage while maintaining accurate monitoring of warehouse consumption?
ASchedule credit usage queries to run hourly and aggregate results daily to reduce query frequency
BRun credit usage queries continuously every minute for real-time accuracy
CDisable warehouse metering history to save storage costs
DUse manual ad-hoc queries only when billing issues arise
Attempts:
2 left
💡 Hint
Balance monitoring frequency with cost impact.