# How to add mulitple checks in single expectation to reduce cost (not in expectation\_suite)

**URL:** <https://discourse.greatexpectations.io/t/how-to-add-mulitple-checks-in-single-expectation-to-reduce-cost-not-in-expectation-suite/1080>\
**Category:** Archive\
**Tags:** how-to, help-wanted, types-of-expectation, expectation-request\
**Created:** [July 14, 2022, 2:25pm UTC](https://discourse.greatexpectations.io/t/how-to-add-mulitple-checks-in-single-expectation-to-reduce-cost-not-in-expectation-suite/1080 "2022-07-14T14:25:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rudranil](https://avatars.discourse-cdn.com/v4/letter/r/ed8c4c/32.png) [@Rudranil](https://discourse.greatexpectations.io/u/Rudranil)\
**Post date:** [July 14, 2022, 2:25pm UTC](https://discourse.greatexpectations.io/t/how-to-add-mulitple-checks-in-single-expectation-to-reduce-cost-not-in-expectation-suite/1080/1 "2022-07-14T14:25:51Z")

</div>

We are trying to achieve a complex rule check like :

“COL\_A\>COL\_B and COL\_C IS NOT NULL and (COL\_D in IN (SELECT COL\_E from another table where main\_table.key=another\_table.key) OR COL\_D is NULL)\*”.

There are some points which we are struggling to sort out :

1. How to add multiple checks in one expectation suite so that we can reduce the query cost. Our datasets are hosted in cloud and is pretty costly to query multiple times. How can we ask the sqlalchemy backend of the GE to combine all expectations in one and then run them in once. We could find out the way of sending the sa.filter to achieve similar thing , but in that case we need to rewrite all the rules, even though there might be existing expectations that can do some blocks of the checks like : COL\_A\>COL\_B , COL\_C IS NOT NULL etc and it would be great if all the required checks could be appended with required ‘sa.and\_/sa.or\_’ .

2. How can we check something like "COL\_D in IN (SELECT COL\_E from another table where main\_table.key=another\_table.key) ", the nearest we have , takes a static value set, but how to have that part also dynamic for scenarios like this ?

3. A clear documentation would always help to build customized expectations quickly, probably something that shows how the parameter flows from expectation to the execution engine , with the explanation of the classes touched in between. I know its lot to ask for 🙂
