> ## Documentation Index
> Fetch the complete documentation index at: https://docs.e6data.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Supported data types

> The data types Query Engine supports, with examples.

<table>
  <colgroup>
    <col width="100" />

    <col width="359" />

    <col width="325" />
  </colgroup>

  <thead>
    <tr>
      <th>Data type</th>
      <th>Description</th>
      <th>Examples</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>`ARRAY`</td>
      <td>An array of the given component type.</td>
      <td>`ARRAY[1, 2, 3]`\
      `select array[1,2,3,4]`</td>
    </tr>

    <tr>
      <td>`BOOLEAN`</td>
      <td>Represents boolean values TRUE and FALSE.</td>
      <td>`TRUE`, `FALSE`\
      `SELECT if(TRUE, 1, 2)`</td>
    </tr>

    <tr>
      <td>`DATE`</td>
      <td>Represents values having values of fields year, month, and day.</td>
      <td>`DATE '2024-03-15'`\
      `SELECT CAST('2024-03-15' AS DATE)`</td>
    </tr>

    <tr>
      <td>`DECIMAL`</td>
      <td>Represents the numbers with precision and a scale factor of x.</td>
      <td>`CAST(12.50 AS DECIMAL(8,2))`\
      `SELECT CAST('7.25' AS DECIMAL(8,2))`</td>
    </tr>

    <tr>
      <td>`DOUBLE`</td>
      <td>Represents x-byte single/variable-precision floating point numbers.</td>
      <td>`CAST(4 AS DOUBLE)`\
      `SELECT sqrt(CAST(4 AS DOUBLE))`</td>
    </tr>

    <tr>
      <td>`FLOAT`</td>
      <td>Represents x-byte single/variable-precision floating point numbers.</td>
      <td>`CAST(1.5 AS FLOAT)`\
      `SELECT CAST('1.5' AS FLOAT)`</td>
    </tr>

    <tr>
      <td>`INT32`</td>
      <td>Represents a 32-bit signed two’s complement integer with a minimum value of -2<sup>31</sup> and a maximum value of 2<sup>31</sup> - 1.</td>
      <td>`CAST(16 AS INT)`\
      `SELECT CAST('42' AS INTEGER)`</td>
    </tr>

    <tr>
      <td>`INT64`</td>
      <td>Represents a 64-bit signed two’s complement integer with a minimum value of -2<sup>63</sup> and a maximum value of 2<sup>63</sup> - 1.</td>
      <td>`CAST(6 AS BIGINT)`\
      `SELECT CAST(9223372036854775807 AS BIGINT)`</td>
    </tr>

    <tr>
      <td>`JSON`</td>
      <td>JSON querying is supported when the JSON data is saved in the form of a string.</td>
      <td>`'{"a":7}'`\
      `SELECT json_extract('{"a":7}', '$.a')`</td>
    </tr>

    <tr>
      <td>`STRING`</td>
      <td>Represents character string values.</td>
      <td>`'aBc'`\
      `SELECT upper('aBc')`</td>
    </tr>

    <tr>
      <td>`STRUCT`</td>
      <td>Represents values with the structure described by a sequence of fields.</td>
      <td>`struct({value:prod,dpid:51})`\
      `select tablename.columnname.structfield1.structfield2 from tablename`</td>
    </tr>
  </tbody>
</table>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.