>>This is tricky in VFP (easier in SQL Server), but there are a couple of options. This article shows two ways to do it in VFP and then switches to SQL Server:
http://www.tomorrowssolutionsllc.com/Articles/Getting%20the%20Top%20N%20for%20each%20Group.pdf>>
>>Tamar
>
>
>Minor point in the PDF - CTEs are Common Table Expressions, not Computed Table Expressions.
Yep, I think you told me that a long time ago, but what's on my site is the PDF as it appeared in FoxRockX. Later articles where I talk about CTEs, I get it right.
Tamar