# Count schema changes over time

Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fdataprime%2Fcookbook%2Fcount_schema_snapshots.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fdataprime%2Fcookbook%2Fcount_schema_snapshots.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

## TL;DR[​](#tldr "Direct link to TL;DR")

Use this when you need to visualize or audit how often schema snapshots occur over time.

## Problem / Use case[​](#problem--use-case "Direct link to Problem / Use case")

You want to track how many schema snapshots are being generated in the system over time to monitor configuration changes or detect unexpected schema churn.

## Query[​](#query "Direct link to Query")

```
source system/engine.schema_fields

| groupby snapshotStartTime

    aggregate count() as snapshots

| sortby snapshotStartTime asc
```

This query groups schema field snapshots by their start time, counts how many were recorded per time period, and sorts them chronologically.

## Expected output[​](#expected-output "Direct link to Expected output")

| snapshotStartTime   | snapshots |
| ------------------- | --------- |
| 1759957200000000000 | 416940    |
| 1759960800000000000 | 413454    |
| 1759964400000000000 | 408979    |
| 1759968000000000000 | 422913    |

## Variations[​](#variations "Direct link to Variations")

* Group by day instead of exact timestamp: `groupby formatTimestamp(snapshotStartTime:timestamp, '%Y-%m-%d') aggregate count() as snapshots`
* Filter by schema type to focus on a specific dataset before grouping.
