Useful Queries For Root Cause Analysis
1. Count of events from the previous day
In order to look at how many events were published from the previous/last publishing date, we can do it in two ways -
i. Jump from Monitor tab
This can be done in the following steps -
In the monitor tab, click on the 'jump to last event' button to get to the most recent event
Select the appropriate time bin, in this case, we can select 1D bin to get day-wise aggregated data
Once we have the data in the chart, we can select the most recent bin
Select 'Export bin and feature to analyze' to jump to analyze tab
![](https://docs.fiddler.ai/~gitbook/image?url=https%3A%2F%2F1798616019-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FmtRqRYN3Dch4wlduXsol%252Fuploads%252Fgit-blob-c410f947b5052cc2b728ce9f2193e685ef187ca0%252F54545c9-1a.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=8a082135&sv=1)
In the analyze tab, query will be auto-populated based on the Monitor tab selection
Modify the query to count the number of events from the selection
ii. Using date
function in Analyze tab
date
function in Analyze tabTo know how many events were published on the last publishing day, we can use date
function of SQL
Use the following query to query number of events
![](https://docs.fiddler.ai/~gitbook/image?url=https%3A%2F%2F1798616019-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FmtRqRYN3Dch4wlduXsol%252Fuploads%252Fgit-blob-a39dfe9e08091a4deba64ba96c6555116cdb8589%252F2676acb-2.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=bdf63f35&sv=1)
2. Number of events on last day by output label
If we want to check how many events were published on the last day by the output class, we can use the following query
![](https://docs.fiddler.ai/~gitbook/image?url=https%3A%2F%2F1798616019-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FmtRqRYN3Dch4wlduXsol%252Fuploads%252Fgit-blob-99b2bad95af3c37cbc1c5f4cf468729424903496%252F29e443f-3.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=c6f4efe9&sv=1)
3. Check events with missing values
If you want to check events where one of the columns is has null values, you can use the isnull
function.
![](https://docs.fiddler.ai/~gitbook/image?url=https%3A%2F%2F1798616019-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FmtRqRYN3Dch4wlduXsol%252Fuploads%252Fgit-blob-389ccba9cfaf01d556283051a129750f39e2b4c7%252F43c2eac-4.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=62e30451&sv=1)
4. Frequency by Categorical column
We query w.r.t to a categorical field. For example, we can count the number of events by geography which is a categorical column using the following query
![](https://docs.fiddler.ai/~gitbook/image?url=https%3A%2F%2F1798616019-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FmtRqRYN3Dch4wlduXsol%252Fuploads%252Fgit-blob-a88d9b61b822e831559e812a3d4fa245dac21b32%252Fcbc5c25-5.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=5b915efd&sv=1)
5. Frequency by Metadata
We can even query w.r.t to a metadata field. For example, if we consider gender to be a metadata column (specified in ModelInfo object), then we can obtain a frequency of events by the metadata field using the following query
![](https://docs.fiddler.ai/~gitbook/image?url=https%3A%2F%2F1798616019-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FmtRqRYN3Dch4wlduXsol%252Fuploads%252Fgit-blob-da69800b1c6f61eca5ec8338b22ad5d6c0502110%252F4e5a79d-6.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=e3c66a32&sv=1)
Filter Events by Cluster_ID
You can query events with certain cluster_ids if you have custom features defined such as embedding vectors.
![](https://docs.fiddler.ai/~gitbook/image?url=https%3A%2F%2F1798616019-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FmtRqRYN3Dch4wlduXsol%252Fuploads%252Fgit-blob-f5f6504576310f4ff38cc1f5c7e022d0ab5572d0%252F0d3cfe6-Screenshot_2023-10-19_at_3.26.43_PM.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=249747c3&sv=1)
↪ Questions? Join our community Slack to talk to a product expert
Last updated