Snowflake snippets
How to find the credit usage of the last 7 days
If you want to query the Information Schema, table WAREHOUSE_METERING_HISTORY
to find credit usage by a warehouse in the last 7 days you can use the following query
SELECT *
FROM TABLE(INFORMATION_SCHEMA.WAREHOUSE_METERING_HISTORY
(DATEADD('DAYS', -7, CURRENT_DATE())));