General information
Forum:
Microsoft SQL Server
Title:
Last record in each group
Environment versions
SQL Server:
SQL Server 2000
Hi, I need a help about how to get the last record (of each group) in a query , something like this:
Select field1,
field2,
max(mydatefield3)
group by
field1 ,
field2
I´m obtaining some records of each group, but I need just ONE record (determined by : max(mydatefield3)).
How can I do that?
Thanks in advance
Carlos Burgos
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only