Our current implementation selects an ordering for rows implicitly. This can lead to results that look like this:
The ordering used by lag is (ORDER BY a), but we don't return the rows in this order. Also, this would be quite confusing if multiple window functions are used.
Instead of running this query like this and produce confusing results, we should return an error of the form: