What is the difference between WINDOW and GROUP BY clause?
How do you write the query below in SQL:1999 using WINDOW clause that is without using GROUP BY?
SELECT T.year, SUM (S.sales)
FROM Sales S, Times T
WHERE S.timeid = T.timeid
GROUP BY T.year
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..
Nope It didn't work. Also I want it to be using WINDOW clause in SQL 1999.
Any help will be appreciated.
Also any idea about first qustion??
Please log in to reply to this post
You can also log in using your Facebook
What people are reading
You might like these other discussions...
· Posts 19
· Viewed 3144
· Likes 1