Here's my code:

```
WITH WEEKCTE AS (SELECT date_trunc('week', day::date) AS anchor, AVG(value) AS average
FROM daily_metrics
WHERE metric = 'daily-active-users'
GROUP BY anchor
ORDER BY anchor)

SELECT*,
(average - lag(average) OVER (ORDER BY anchor))/lag(average) OVER (ORDER BY anchor) AS delta
FROM WEEKCTE

```

Here's the result:
[![enter image description here](https://i.stack.imgur.com/4NO4T.png)](https://i.stack.imgur.com/4NO4T.png)

But I want the first row of delta to show 0 instead of null.
I tried with lag(average,0,0) instead of lag(average) to offset by 0 and set default to 0 but it does not work either.