>I got a "Group by clause missing or invalid" when I tried this. Putting a "GROUP BY team" before the HAVING clause didn't change the error.
>
>My attempt was
>SELECT * FROM myTable mt1;
> WHERE score IN (SELECT score FROM myTable mt2 WHERE mt1.team = mt2.team ORDER BY score DESC TOP 3)
>
>This generated a "Function name is missing )" error. It seems that any ORDER BY inside a IN() clause generates this error. Could you please explain why?
Rich,
It'll only run in VFP9. How come you didn't upgrade yet? <g>
--sb--