# Need to write KQL to check if these 4 documents occur one after the other

**URL:** <https://discuss.elastic.co/t/need-to-write-kql-to-check-if-these-4-documents-occur-one-after-the-other/273916>\
**Category:** Kibana\
**Tags:** kql-kibana-query-language\
**Created:** [May 25, 2021, 9:51am UTC](https://discuss.elastic.co/t/need-to-write-kql-to-check-if-these-4-documents-occur-one-after-the-other/273916 "2021-05-25T09:51:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhishek\_s1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abhishek_s1/32/85080_2.png) [@abhishek\_s1](https://discuss.elastic.co/u/abhishek_s1)\
**Post date:** [May 25, 2021, 9:51am UTC](https://discuss.elastic.co/t/need-to-write-kql-to-check-if-these-4-documents-occur-one-after-the-other/273916/1 "2021-05-25T09:51:48Z")

</div>

```
    1. 31628 2021-02-13T00:20:49.325893Z - xyz svn/repos open
    2. 31628 2021-02-13T00:20:49.607437Z - xyz svn/repos get-latest
    3. 31628 2021-02-13T00:20:49.888794Z - xyz svn/repos reparent 
    4. 31628 2021-02-13T00:20:50.170101Z - xyz svn/repos stat 

```

I need to write KQL such that, it should show up document groups like these (i.e., group of 4 documents with open, get-latest, reparent, stat). All 4 must be within one second range as shown in above logs.

Please help me, If this is possible with KQL.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 22, 2021, 9:52am UTC](https://discuss.elastic.co/t/need-to-write-kql-to-check-if-these-4-documents-occur-one-after-the-other/273916/2 "2021-06-22T09:52:11Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
