Despite the lack of ignore nulls syntax in postgres, we can mimic the required behavior by defining custom aggregates. Albeit being simple, it has several advantages.
Tag Archives: window-function
Calculating moving median in Postgres
0. The problem Some time ago I’ve stumbled on this interesting question on stackoverflow (as stated in the title). I could not find any satisfactory answer at that time, so I came up with this solution. I think the problem is interesting enough to make it into a blog post. The following table shows theContinue reading “Calculating moving median in Postgres”