Fix order_by behaviour. Improve bq windowing support