# How to query with multiple conditions with Query.jl?

**URL:** <https://discourse.julialang.org/t/how-to-query-with-multiple-conditions-with-query-jl/78240>\
**Category:** New to Julia\
**Tags:** query\
**Created:** [March 21, 2022, 8:43pm UTC](https://discourse.julialang.org/t/how-to-query-with-multiple-conditions-with-query-jl/78240 "2022-03-21T20:43:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SubTer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/subter/32/28830_2.png) [@SubTer](https://discourse.julialang.org/u/SubTer)\
**Post date:** [March 21, 2022, 8:43pm UTC](https://discourse.julialang.org/t/how-to-query-with-multiple-conditions-with-query-jl/78240/1 "2022-03-21T20:43:27Z")

</div>

hey,

hoping someone can help me out with the syntax Julia Query uses, or maybe I am missing something, but basically trying to replicate a query command using contains, instead of having bunch of “||” statements.

example:

```julia
IndexOne |> @query(i, begin
@where i.X1 == "ab1" || i.X1 == "ab2" || i.X1 == "ab3" 
@select (X1 = i.X1)
end) |> DataFrame 

```

cant quite get it to work with something easier like @contains(i.X1 = (“ab1”, “ab2”, “ab3”) )

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [March 21, 2022, 8:59pm UTC](https://discourse.julialang.org/t/how-to-query-with-multiple-conditions-with-query-jl/78240/2 "2022-03-21T20:59:01Z")

</div>

You can just write `i.X1 in ("ab1", "ab2", "ab3")`.

---

<div class="post-metadata">

**Author:** ![SubTer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/subter/32/28830_2.png) [@SubTer](https://discourse.julialang.org/u/SubTer)\
**Post date:** [March 22, 2022, 12:50pm UTC](https://discourse.julialang.org/t/how-to-query-with-multiple-conditions-with-query-jl/78240/3 "2022-03-22T12:50:35Z")

</div>

yep that worked… much easier haha - didnt realize “in” was supported.
