Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GROUP BY to extract the most oldest record
Message
From
05/01/2003 11:43:18
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00738069
Message ID:
00738145
Views:
24
>It'll give you MIN(Numero) for each group but the rest of the fields in the record, that are not in group by clause, will come from the last physical record in the group which may or may not be the record with MIN(Numero).

Don't forget that VFP8 will not allow queries like this. Everything that is not an aggregate field (SUM(), TOP(), etc.) that is in the SELECT clause must be included in the GROUP BY clause. It looks like your other solution is what Michel really needs since he needs the whole record that has the minumum value in a particular field.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform