title: sum() Over(partition by order by a,b)
body: <p>I have a table:</p>
  <pre><code>fname|o_details| cost
  eva  |coat|125
  eva  |coat|225
  eva  |shirt|60
  eva  |slipper|20
  farida|coat|100
  farida|shirt|50
  farida|shoes|80
  farida|skirt|30
  henry|shoes|80
  </code></pre>
  <p>I am trying to understand difference between:</p>
  <pre><code>sum(cost) over(partition by fname order by fname desc) as part_by_fname,
  sum(cost) over(partition by fname order by fname,o_details desc) as part_by_both
  </code></pre>
  <p>I had a understanding that order by in over clause just change the order and we apply the window aggregation function based on the partitions. But to my surprise I am getting the output as attached.
  .<a href="https://i.stack.imgur.com/2SaaX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2SaaX.png" alt="enter image description here" /></a></p>
  <p>Please explain the logic behind these two over clauses and what makes them different</p>