# API Query | AND statement

**URL:** <https://forum.thegraph.com/t/api-query-and-statement/2010>\
**Category:** Questions\
**Created:** [May 19, 2021, 2:15am UTC](https://forum.thegraph.com/t/api-query-and-statement/2010 "2021-05-19T02:15:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![0x\_M](https://avatars.discourse-cdn.com/v4/letter/0/b782af/32.png) [@0x\_M](https://forum.thegraph.com/u/0x_M)\
**Post date:** [May 19, 2021, 2:15am UTC](https://forum.thegraph.com/t/api-query-and-statement/2010/1 "2021-05-19T02:15:16Z")

</div>

How to use “and” statement to combine two different conditions e.g.

date\_lt: x  
&  
tvl\_gt: 10000 ?

In general, have problems with aggregation functions in graphQL, so if there are any relevant docs I would appreciate it.

---

<div class="post-metadata">

**Author:** ![adamfuller](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@adamfuller](https://forum.thegraph.com/u/adamfuller)\
**Post date:** [May 21, 2021, 10:29am UTC](https://forum.thegraph.com/t/api-query-and-statement/2010/2 "2021-05-21T10:29:16Z")

</div>

Hi! This is probably a better question for [Discord](https://discord.gg/vtvv7FP) in #subgraph-development, but you should be able to pass both of those statements as part of the `where` e.g.  
`where: {date_lt: x, tvl_gt: 10000}`  
Subgraph graphQL does not currently support aggregation functions, but it is an area of active research!

---

<div class="post-metadata">

**Author:** ![0x\_M](https://avatars.discourse-cdn.com/v4/letter/0/b782af/32.png) [@0x\_M](https://forum.thegraph.com/u/0x_M)\
**Post date:** [May 24, 2021, 5:21am UTC](https://forum.thegraph.com/t/api-query-and-statement/2010/3 "2021-05-24T05:21:38Z")

</div>

Thanks a lot, Adam! Wasn’t sure where is the best place to ask the question, next time will do it at Discord
