diff --git a/ibis/backends/base/sql/registry/window.py b/ibis/backends/base/sql/registry/window.py index 8343499fb5e7..eb711a9d0e68 100644 --- a/ibis/backends/base/sql/registry/window.py +++ b/ibis/backends/base/sql/registry/window.py @@ -123,7 +123,7 @@ def window(translator, op): arg_formatted = translator.translate(func.__window_op__) result = f"{arg_formatted} {window_formatted}" - if isinstance(func, ops.RankBase): + if isinstance(func, (ops.RankBase, ops.NTile)): return f"({result} - 1)" else: return result