Bugs item #2926454, was opened at 2010-01-06 05:20
Message generated for change (Tracker Item Submitted) made by yuin405
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2926454&group_id=56967
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: SQL/Core
Group: MonetDB5 "stable"
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Makoto YUI (yuin405)
Assigned to: Niels Nes (nielsnes)
Summary: Error on "rank() over (order by sum(.."
Initial Comment:
The following query causes "SELECT: subquery result missing" error and server
crashes on Nov2009-SP1/Linux X86-64.
select
s_name,
sum(score) as totalscore,
rank() over (order by sum(score) desc) -- cannot use alias 'totalscore' here
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);
Slightly related discussion (though the issue is aggregation in group-by) is
found in
http://markmail.org/thread/33hxthbvr7csb66o
-- Note then that the following expression works properly.
select
s_name,
sum(score),
from score_table
group by s_name
order by sum(score) desc
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2926454&group_id=56967
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs