-- USE LAG IGNORING NULLS AND GRAB PREVIOUS VALUE. FILTER OPPOSITE DIRECTION TO GET BACK FILL
SELECT
DATE,
GROUP,
REVENUE
COALESCE(REVENUE, LAG(REVENUE) IGNORE NULLS OVER (PARTITION BY GROUP order by DATE), LAG(REVENUE) IGNORE NULLS OVER (PARTITION BY GROUP order by DATE DESC)) as FILL_VALUE
FROM _ADS A