# Understanding $lt, $gt, and Other Operators in GraphQL Explorer

**URL:** <https://forum.builder.io/t/understanding-lt-gt-and-other-operators-in-graphql-explorer/5896>\
**Category:** Technical Questions\
**Tags:** query, graphql, operator\
**Created:** [July 1, 2024, 3:06pm UTC](https://forum.builder.io/t/understanding-lt-gt-and-other-operators-in-graphql-explorer/5896 "2024-07-01T15:06:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![manish-sharma](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@manish-sharma](https://forum.builder.io/u/manish-sharma)\
**Post date:** [July 1, 2024, 3:06pm UTC](https://forum.builder.io/t/understanding-lt-gt-and-other-operators-in-graphql-explorer/5896/1 "2024-07-01T15:06:58Z")

</div>

I wanted to share a quick example of how to use comparison operators like `$lt` (less than), `$gt` (greater than), and others in [GraphQL Explorer](https://builder.io/graphql-explorer). These operators are handy when you need to filter data based on certain conditions. Below is a sample query to illustrate the usage.

### Example Query

Here’s a simple query where we are using the `$lt` operator to fetch records where the field `myNumber` is less than 10:

```auto
query {
  newPage(query: { data: "{ myNumber: { \"$lt\": 10 } }"}) {
    data {
      myNumber
    }
  }
}

```

### Example Using `$gt` and `$ne`

Here’s another example where we use both `$gt` and `$ne`:

```auto
query {
  newPage(query: { data: "{ myNumber: { \"$gt\": 20, \"$ne\": 30 } }"}) {
    data {
      myNumber
    }
  }
}

```

> **[Builder.io: Visual Development Platform](https://builder.io/graphql-explorer)**
>
> Builder is an AI-Powered Visual Development Platform that helps teams generate, iterate, and optimize web and mobile experiences in seconds instead of sprints.

Using these operators can significantly enhance your queries, allowing you to retrieve exactly the data you need. Feel free to experiment with different operators and share your findings or any questions you might have!
