# How convert needed SQL query to Elastic DSL

**URL:** <https://discuss.elastic.co/t/how-convert-needed-sql-query-to-elastic-dsl/297585>\
**Category:** Elasticsearch\
**Tags:** eql-elastic-query-language\
**Created:** [February 18, 2022, 9:53am UTC](https://discuss.elastic.co/t/how-convert-needed-sql-query-to-elastic-dsl/297585 "2022-02-18T09:53:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alessio-hermes](https://avatars.discourse-cdn.com/v4/letter/a/cc9497/32.png) [@alessio-hermes](https://discuss.elastic.co/u/alessio-hermes)\
**Post date:** [February 18, 2022, 9:53am UTC](https://discuss.elastic.co/t/how-convert-needed-sql-query-to-elastic-dsl/297585/1 "2022-02-18T09:53:38Z")

</div>

Hello everyone,  
I have an index with 19 mapped fields and I need to query it with query like this:

```auto
SELECT * FROM my-index WHERE field1 IN (value1, value2) AND field2 IN (valueX, valueY, valueZ) AND *anyOfThe19Fields* CONTAINS '2-f2d2cd00-8990-11ec-95bc-000d3a2d1528';

```

I really can't figure out how I can implement something like that with a single query.

I would appreciate your help, thx 🙂

---

<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:** [March 18, 2022, 9:54am UTC](https://discuss.elastic.co/t/how-convert-needed-sql-query-to-elastic-dsl/297585/2 "2022-03-18T09:54:09Z")

</div>

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