4 Jan
2010
4 Jan
'10
5:06 a.m.
Hi, The following query yields "SELECT: subquery result missing" error on Nov2009-SP1. select s_name, sum(score), rank() over (order by sum(score) desc) from score_table group by s_name -- preparation create table score_table ( s_name varchar(20), subject varchar(10), score int ); insert into score_table values('foo','english',70); insert into score_table values('foo','history',50); insert into score_table values('foo','math',60); insert into score_table values('bar','english',45); insert into score_table values('bar','history',75); It seems allowed to use aggregation functions in "over(..)" in other databases. http://www.google.com/search?q="rank()+over+(order+by+sum(" Thanks, Makoto