Posted by: open April 26, 2011
Any SQL Database gurus
Login in to Rate this Post:     0       ?        
 I am not SQL Database guru but just check this works in your case.

SELECT T.year,
SUM (S.sales) OVER (PARTITION BY T.year)

FROM Sales S, Times T

WHERE S.timeid = T.timeid


Just give a try..
 

Read Full Discussion Thread for this article