title: SQL Sum window function
body: <p>I have a table where I need one more column with sum values for 4 previous rows.</p>
  <p>The table is something like this:
  <a href="https://i.stack.imgur.com/x7KqQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x7KqQ.png" alt="enter image description here" /></a></p>
  <p>So for example in that new column for row number 5, value should be 29 because 4 rows before that have 6+8+8+7 = 29.</p>
  <p>I know I should probably use window function, which I tried but without success to make it sum 4 previous values from order_rate column. (with partition by, with order by, with between, etc..) I'm probably missing something small as usual :'(</p>
  <p>Thanks in advance!</p>