# SQL query failed due to multi-nested

**URL:** <https://discuss.elastic.co/t/sql-query-failed-due-to-multi-nested/144815>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-sql\
**Created:** [August 17, 2018, 4:15am UTC](https://discuss.elastic.co/t/sql-query-failed-due-to-multi-nested/144815 "2018-08-17T04:15:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Siping\_Wang](https://avatars.discourse-cdn.com/v4/letter/s/57b2e6/32.png) [@Siping\_Wang](https://discuss.elastic.co/u/Siping_Wang)\
**Post date:** [August 17, 2018, 4:15am UTC](https://discuss.elastic.co/t/sql-query-failed-due-to-multi-nested/144815/1 "2018-08-17T04:15:16Z")

</div>

I am trying to index the following document and I have made `results` a nested type.

```auto
 {
      "template_version": "B",
      "study": {
        "source": "A"
      },
      "results": [
        {
          "barcode": "S",
          "assay": {
            "type": "B",
            "sub_type": "H"
          },
          "value": 0.98,
          "unit": "nM",
          "image": "1d6",
          "metric": "IC50"
        },
        {
          "barcode": "S",
          "assay": {
            "type": "B",
            "sub_type": "LC"
          },
          "value": 2.3,
          "unit": "nM",
          "image": "1dac",
          "metric": "IC50"
        }
     ]
    }

```

When I run the SQL query `SELECT *, results.*, results.assay.* FROM index`, I got the following error

```auto
sql_illegal_argument_exception
Multi-nested docs not yet supported [results, results.assay]

```

Is this a known issue? If so, when/if will this be solved? Is it possible to run `SELECT * FROM index` to get all the fields/properties, independent how nested they are, back?

---

<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:** [September 14, 2018, 4:15am UTC](https://discuss.elastic.co/t/sql-query-failed-due-to-multi-nested/144815/2 "2018-09-14T04:15:18Z")

</div>

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