Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select top 3 within a group
Message
From
19/12/2008 15:54:18
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01129690
Message ID:
01368922
Views:
24
Naomi,

did you test the statement? I get error "Invalid use of subquery"

with :
select  score , team ;
	from crResult as A1 ;
	where (select count(*) from crResult as A2 where A2.team=A1.team and A2.score<=A1.score ) <=2 ; 
	order by score
Regards,

Koen

P.S. My testdata consists of CREATE CURSOR crResult (team c(4), score n(2,0)) with values as per example given
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform