Feature Request: ASOF JOIN support for time-series joins

Feature Request: ASOF JOIN support for time-series joins

Feature Request: ASOF JOIN support for time-series joins

Hi all,

I'd like to request native support for an ASOF JOIN (as-of join) in Zoho Analytics SQL query tables, similar to DuckDB's ASOF JOIN and pandas' merge_asof().

The problem

When building a time-series by joining two other time-series on a timestamp, the timestamps rarely line up exactly. An ASOF JOIN matches each row in the left table to the closest preceding row in the right table, instead of requiring an exact match.

This is currently possible in Zoho Analytics, but only through workarounds — I've been using window functions and the "gaps and islands" technique. These work, but they're verbose, harder for analysts to read and maintain, and don't scale gracefully. A first-class ASOF JOIN would collapse all of that into a single, self-documenting clause.

Example

Suppose we have an orders table and a stock table. Both are cumulative time-series that generally trend upward but can dip. We want to return one row per order, showing the total order volume and the total stock as they stood at the moment each order was placed:

orders

tstotal_orders
09:00:05120
09:00:12138

stock

tstotal_stock
09:00:00500
09:00:10480

Desired output — each order matched to the most recent stock level at or before its timestamp:

tstotal_orderstotal_stock
09:00:05120500
09:00:12138480

In DuckDB this is simply:

sql
SELECT o.ts, o.total_orders, s.total_stock
FROM orders o
ASOF JOIN stock s
ON o.ts >= s.ts

The pandas equivalent is merge_asof(orders, stock, on="ts").

Why it matters

We're currently generating this kind of time-series in CRM with Zoho Deluge, writing results to records in a module. We'd like to simplify that by moving the logic into SQL query tables in Zoho Analytics — a system our analysts find easier to understand and maintain. Native ASOF JOIN support would meaningfully increase the viability of Zoho Analytics and SQL as a replacement for our Deluge-based pipeline.

Producing one time-series by joining two on a nearest-timestamp basis is a very common operation in analytics, monitoring, and operational reporting. First-class support would remove real friction and help Zoho Analytics further stand out from the crowd. Last time I checked, not many products include support for ASOF.

Final note: I'm aware this result could be acheived in Code Studio with pandas `merge_asof`. While this is an option, our analysts don't use python and I would love to aim for the simplest solution.

Thanks for considering it!