# Complex query in Kibana

**URL:** <https://discuss.elastic.co/t/complex-query-in-kibana/62840>\
**Category:** Kibana\
**Created:** [October 12, 2016, 5:03pm UTC](https://discuss.elastic.co/t/complex-query-in-kibana/62840 "2016-10-12T17:03:07Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![LeeDr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leedr/32/9289_2.png) [@LeeDr](https://discuss.elastic.co/u/LeeDr)\
**Post date:** [October 17, 2016, 6:04pm UTC](https://discuss.elastic.co/t/complex-query-in-kibana/62840/4 "2016-10-17T18:04:06Z")

</div>

This is a bit complicated, but I think it's a clue to what you're trying to do. You could used the Advanced JSON Input field.

> [@Display concurrency in data on Kibana](https://discuss.elastic.co/t/display-concurrency-in-data-on-kibana/26006):
>
> I have fields with start date and duration (seconds) representing start and duration of a phone call. I would like to define concurrency (a number) when the same destination (also a field) is active within the same duration. That is if a ncall starts now for 30 seconds and another call to the same destination starts 15 seconds into the first call, concurrency should be 2 for the remaining 15 seconds. How do I define this in Kibana visualization as a line graph over time?

---

_[View the full topic](https://discuss.elastic.co/t/complex-query-in-kibana/62840)._
