Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GROUP BY to extract the most oldest record
Message
From
06/01/2003 11:58:31
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
06/01/2003 11:12:05
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00738069
Message ID:
00738395
Views:
20
>>Group by pkfield ?
>>
>>select * from myTable A where datefield = ;
>> (select min(datefield) from myTable B where a.pkfield = b.pkfield) ;
>> order by pkfield
>>
>
>It was with the primary key but you pretty much gave the same answer as the others. Thanks

Yes it was my mistake to say pkfield. It'd be groupingField(s). Otherwise result is all records.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform