# How can I call "extended\_stats" in Elasticsearch 6.4.0 SQL syntax

**URL:** <https://discuss.elastic.co/t/how-can-i-call-extended-stats-in-elasticsearch-6-4-0-sql-syntax/145941>\
**Category:** Elasticsearch\
**Created:** [August 24, 2018, 4:15pm UTC](https://discuss.elastic.co/t/how-can-i-call-extended-stats-in-elasticsearch-6-4-0-sql-syntax/145941 "2018-08-24T16:15:46Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![jam1142](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@jam1142](https://discuss.elastic.co/u/jam1142)\
**Post date:** [September 7, 2018, 2:52pm UTC](https://discuss.elastic.co/t/how-can-i-call-extended-stats-in-elasticsearch-6-4-0-sql-syntax/145941/5 "2018-09-07T14:52:38Z")

</div>

Thenka Andrei. I am facing another problem please see if you can help me on this. Here is the link

> [@How can I check index exists in logstash filter and how can get dynamic field from elasticsearch lookup( in filter plugin)](https://discuss.elastic.co/t/how-can-i-check-index-exists-in-logstash-filter-and-how-can-get-dynamic-field-from-elasticsearch-lookup-in-filter-plugin/147616):
>
> Q1: How can i check index exists in "Elasticsearch filter plugin". My situation is taht i am getting old data from elasticsearch to subtract from current record but in case if that index doesn't exist then i want to subtract 0. Currently Its throwing error if index doesn't exist. I need to know how can i check if index exist in elasticsearch filter so i can handle it. Q2: Is there a way to do get filter lookup field by dynamic name like elasticsearch { hosts =\> "localhost:9200" index =\> "pt…

---

_[View the full topic](https://discuss.elastic.co/t/how-can-i-call-extended-stats-in-elasticsearch-6-4-0-sql-syntax/145941)._
