🗣️📊 SwiftQuery AI now lets you ask questions with natural language, or easily drag + drop →

Relative Dates, Date Grouping, and Column Filters

Dealing with dates can be confusing when querying data. Time stamps often need to be converted to more usable minute, hour, day, month, or year fields.

And setting up a trailing date rate (like last 7 days) that is typically means figuring out NOW(), INTERVAL, and CAST functions in SQL.

With our latest release today (1.9.5), Zing does all this for you automatically, configureable with a few taps.

Relative Dates

Use relative dates to have a query always return dates in the most recent X days/weeks/months/years, For instance, if you want “Sales of the last 30 days” in SQL you’d select the sum of sales, grouped by sale_time as a date where in the sale_time is within the last 30 days.

With Zing’s visual query editor, you can specify a relative date rage easily:

  • Long tap on a date or timestamp field
  • Tap When a condition is met
  • Tap Relative date
  • Select the look back period

Optionally, you can choose to group dates by minute, hour, day, month, or year as well.

Date Grouping

You can now group dates and timestamps by second, minute, hour, day, month, or year. This makes it easier to aggregate results in a meaningful way and graph them in a way that makes sense.

For instance, for server log data you may want to look at data by second or minute to diagnose when an outage occurred precisely.

But for sales data, you’d likely be more interested in daily or weekly roll-ups versus a second-by-second view (as many seconds might have 0 sales, leading to noisy and difficult to interpret graphs).

Specify date granularity for a question by:

  • Long tapping on the date or timestamp field
  • Tapping the calendar settings icon on that field
  • Selecting the grouping period you’d like

Column Filters

Once you’ve run a query you can display results as a data table.

Zing now supports sorting and filtering data tables in-line. Just tap the column header filter icon:

From here you can filter by:

  • Specific values (via tick boxes)
  • CONTAINS
  • DOES NOT CONTAIN
  • Is NULL
  • Isn’t NULL
  • Begins with
  • Does NOT begin with
  • Ends with
  • Does NOT end with
  • Equals

Multiple filters can be applied on a single column, and filters can be applied on multiple columns at the same time.

Related articles

Download Zing For Free

Available on iOS, Android, and the web

Learn how Zing can help you and your organization collaborate with data

Schedule Demo