Query & edit

Filtering data

Narrow a table down with typed conditions, relative dates and value suggestions, or with a raw WHERE clause.

Every table viewer has a filter bar above the grid with two modes: Builder and SQL. TableGrip remembers which one you used last.

The filter bar with a condition on status and total, above the filtered orders
The filter bar with a condition on status and total, above the filtered orders

#Builder

The builder composes conditions as rows of column · operator · value. Combine them as all (AND) or any (OR), nest groups (a group can be negated), and mix in hand-written SQL conditions where you need them.

Each column's type decides which operators it offers and how its value is read:

Column kindOperators
Text= ≠, contains, starts / ends with, is one of, like, regex (PostgreSQL, MySQL), is empty, NULL checks, < > between
Number= ≠ < ≤ > ≥, between, is one of, NULL checks, starts with / contains (as text)
Date, date-timeis on / before / after, between, is one of, is today / yesterday / this week / month / year, in the last N days
Booleanis true / false
UUID, JSON, enums and othersequality, lists and text matching

Press ↩ in any field to apply. The compiled WHERE clause is shown below the conditions, ready to copy or to switch to Edit as SQL.

#Dates

Date fields accept exact values and relative ones:

You typeMeans
2026-10-28That day. On a date-time column, the whole day.
2026-10-28 13:45:00+07That exact moment
today, nowThe start of today, the current moment
now-2h, today-7dTwo hours ago, seven days before today
3 months agoThree months before now

Units are s, min, h, d, w, mo and y. Relative dates are worked out again on every reload, so a saved "last 7 days" filter stays current. The field shows what your value resolves to, and offers quick picks.

#Lists, text and suggestions

  • Lists (is one of) take commas or new lines. Quote a value that contains a comma, and write NULL for null.
  • Text matching is case-insensitive unless you turn on Aa.
  • Value fields suggest real values from the column as you type, or press ⌃ Space.
  • Problems are flagged on their row before anything runs, so a typo in a date never becomes a slow query.

Note

Values are always bound as typed query parameters, never pasted into the SQL. A filter value can't break or inject into the query.

#SQL

SQL mode takes a raw WHERE clause with the same completion as the SQL editor, against the table you're viewing: columns, operators and values from the data. Clauses that can't appear in a filter are left out.

Switching from Builder to SQL carries your conditions over as SQL. Switching back keeps hand-written SQL as a SQL condition inside the builder.

#Quick filters from the grid

Right-click any cell → Filter by This Value adds a typed condition for that column and value.