Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Statement
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01114622
Message ID:
01114639
Views:
18
>>
SELECT CustomerID, MAX(DateTimeField) AS MaxDT FROM mytable GROUP BY CustomerID
>How does this ensure that it's the max/latest for a given Cust_ID?

Hi Terry,

The 'GROUP BY CustomerID' gives 1 record per CustomerID and 'MAX(DateTimeField)' returns the latest date for each CustomerID.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform