# Data Table query to get distinct values

**URL:** <https://forums.losant.com/t/data-table-query-to-get-distinct-values/3252>\
**Category:** Help\
**Tags:** experience\
**Created:** [September 9, 2020, 2:01pm UTC](https://forums.losant.com/t/data-table-query-to-get-distinct-values/3252 "2020-09-09T14:01:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sreyams\_Jain1](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@Sreyams\_Jain1](https://forums.losant.com/u/Sreyams_Jain1)\
**Post date:** [September 9, 2020, 2:01pm UTC](https://forums.losant.com/t/data-table-query-to-get-distinct-values/3252/1 "2020-09-09T14:01:56Z")

</div>

How to get DISTINCT values from a data table column using queries in the API call with data-tables/rows/query?

---

<div class="post-metadata">

**Author:** ![anaptfox](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/anaptfox/32/873_2.png) [@anaptfox](https://forums.losant.com/u/anaptfox)\
**Post date:** [September 9, 2020, 2:13pm UTC](https://forums.losant.com/t/data-table-query-to-get-distinct-values/3252/4 "2020-09-09T14:13:52Z")

</div>

@Sreyams_Jain1,

Could you provide a link from the [docs](https://docs.losant.com/rest-api/overview/) to the API you’re using?

---

<div class="post-metadata">

**Author:** ![Sreyams\_Jain1](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@Sreyams\_Jain1](https://forums.losant.com/u/Sreyams_Jain1)\
**Post date:** [September 9, 2020, 2:16pm UTC](https://forums.losant.com/t/data-table-query-to-get-distinct-values/3252/5 "2020-09-09T14:16:55Z")

</div>

POST [https://api.losant.com/applications/](https://api.losant.com/applications/) `APPLICATION_ID` /data-tables/ `DATA_TABLE_ID` /rows/query

---

<div class="post-metadata">

**Author:** ![anaptfox](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/anaptfox/32/873_2.png) [@anaptfox](https://forums.losant.com/u/anaptfox)\
**Post date:** [September 9, 2020, 2:52pm UTC](https://forums.losant.com/t/data-table-query-to-get-distinct-values/3252/8 "2020-09-09T14:52:18Z")

</div>

After some discussion with the engineering team, `DISTINCT` isn’t currently an operation we support for Data Tables. What I can do is make a feature request for this, and let you know if it gets released!

Depending on your use case, you could access MYSQL ( or any other SQL ) DB in a workflow. It would give you the ability to have more query power but does require you to have/maintain an instance of a SQL database.

---

<div class="post-metadata">

**Author:** ![Sreyams\_Jain1](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@Sreyams\_Jain1](https://forums.losant.com/u/Sreyams_Jain1)\
**Post date:** [September 9, 2020, 2:58pm UTC](https://forums.losant.com/t/data-table-query-to-get-distinct-values/3252/9 "2020-09-09T14:58:31Z")

</div>

Thanks, that will be a good feature to have.  
In the meantime, I will get all rows and loop through to get distinct values.
