Canonical: https://weaveos.com/reference/snowflake/inspect-recent-query-history

1. [Software capabilities](https://weaveos.com/reference)
2. /[Snowflake](https://weaveos.com/reference/snowflake)
3. /Inspect recent Snowflake query history

[![](https://weaveos.com/reference/logos/snowflake.svg)Snowflake](https://weaveos.com/reference/snowflake)

# Inspect recent Snowflake query history

Snowflake exposes recent query history in Snowsight and through the QUERY\_HISTORY table function. Use the interface for interactive query profiles or Snowflake CLI to capture a repeatable SQL result.

Documentation reviewed November 27, 2026 · 2 methods with sources

## Ways to do it

1. [1CLI: snow sql with QUERY\_HISTORY](https://weaveos.com/reference/snowflake/inspect-recent-query-history#method-1)
2. [2Interface: Snowsight Monitoring → Query History](https://weaveos.com/reference/snowflake/inspect-recent-query-history#method-2)

CLI

### snow sql with QUERY\_HISTORY

Run an Information Schema QUERY\_HISTORY table function through Snowflake CLI and return the most recent queries in a time window.

[Read source: Snowflake QUERY\_HISTORY table function](https://docs.snowflake.com/en/sql-reference/functions/query_history)

- Requirements

  Snowflake CLI configured with a connection, a role that can use the target database and schema, and MONITOR or OPERATE on warehouses when the result must include queries from other users.

- Limitations

  The Information Schema table function covers only the previous seven days and visibility depends on the active role. Snowflake also notes that some hybrid-table executions are not represented in this function.

Example shell

Copy

```
snow sql -q "SELECT query_id, user_name, execution_status, total_elapsed_time FROM TABLE(INFORMATION_SCHEMA.QUERY_HISTORY(END_TIME_RANGE_START => DATEADD('hour', -1, CURRENT_TIMESTAMP()), RESULT_LIMIT => 20)) ORDER BY start_time DESC"
```

Interface

### Snowsight Monitoring → Query History

Open Snowsight, choose Monitoring, then Query History to filter individual or grouped queries and open query details and profiles.

[Read source: Snowflake Snowsight Query History](https://docs.snowflake.com/en/user-guide/ui-snowsight-activity)

- Requirements

  A Snowflake account login and a role with access to the query history being reviewed. MONITOR or OPERATE on a warehouse is needed to see queries from other users on that warehouse.

- Limitations

  The Snowsight Query History page covers queries from the last 14 days, while user information is omitted from details for queries older than seven days.

## More from Snowflake

[View all 1 Snowflake tasks](https://weaveos.com/reference/snowflake)
