title: Over Partition By not working for Weighted AVG Calc
body: <p>I don't know how I am missing this, but I am sure it's from late nights!
  Any help appreciated
  let's say we are using NorthWind to Calculate Weighted AVG</p>
  
  <pre><code>USE NORTHWIND
  Select  OD.UnitPrice,OD.Quantity,
  sum(OD.UnitPrice*OD.Quantity)/sum(OD.Quantity) OVER (PARTITION BY
  OD.UnitPrice, OD.Quantity) as[ W-AVERAGE] 
   From [Order Details] OD
  </code></pre>
  
  <p>What am I missing as to why SQL keeps saying Column 'Order Details.UnitPrice' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.? I thought using Partition By solves having to have a group by?</p>