Datetime RangeBetween in Pipeline Builder

Is this query possible in PB?

“”"
SELECT *, sum(qty_lost_sales) OVER (
PARTITION BY sku_number
ORDER BY CAST(lookup_date AS timestamp)
RANGE BETWEEN INTERVAL 365 DAYS PRECEDING AND CURRENT ROW
) AS qty_lost_sales_L12M FROM dat_lookup_lost_sales_input
“”"

qty_lost_sales double
lookup_date date
sku_number str

PB>Window>RangeBetween does not seem to allow to order by timestamp types.

Should I try and cast “lookup_date” as Double/Int with epoch time conversion?

Hey! Yeah I would try out casting the lookup_date as a double/int and then ordering. Let us know if you’re still running into issues though