# Elastic query

**URL:** https://discuss.elastic.co/t/elastic-query/376688
**Category:** Kibana
**Created:** [April 2, 2025, 1:41pm UTC](https://discuss.elastic.co/t/elastic-query/376688 "2025-04-02T13:41:40Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Paf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paf/32/99015_2.png) [@Paf](https://discuss.elastic.co/u/Paf)
#### Post date: [April 2, 2025, 1:41pm UTC](https://discuss.elastic.co/t/elastic-query/376688/1 "2025-04-02T13:41:40Z")

</div>

Hello,

Il would like to make a query that is use to analyze the data to identify, for each distinct value of the field « Field\_a », if the values of the field\_b change from « value\_b\_1 » to « value\_b\_2 » over a given period (e.g., 30 days).

Example :

Log\_1 :

```auto
Field_a : value_a_1
Field_b :value_b_1

```

Log\_2

```auto
Field_a : value_a_1
Field_b : value_b_2

```

Log\_3

```auto
Field_a : value_a_2
Field_b : value_b_1

```

Log\_4

```auto
Field_a : value_a_2
Field_b : value_b_1

```

In this example, the query retrun log\_ 3.

Someone can help-me?

Thanks
