Hi,
I have a dataset which looks like this:
ID Seqnum Seqnum2 Date
===========================
1 0 0 1/1/2005
1 1 0 1/2/2005
1 1 1 1/3/2005
2 0 0 2/1/2005
3 0 0 1/1/2005
3 1 0 1/2/2005
4 0 0 1/2/2005
Problem: To show entire row
FOR each unique ID, unique SEQNum, max(SEQNum2) and latest DATE.
What I could do so far:
SELECT ID,Seqnum,Seqnum2,Max(Date)
GroupBY ID,Seqnum,Seqnum2
The above table has other columns I am interested in.
Thanks,
Raj.
I have a dataset which looks like this:
ID Seqnum Seqnum2 Date
===========================
1 0 0 1/1/2005
1 1 0 1/2/2005
1 1 1 1/3/2005
2 0 0 2/1/2005
3 0 0 1/1/2005
3 1 0 1/2/2005
4 0 0 1/2/2005
Problem: To show entire row
FOR each unique ID, unique SEQNum, max(SEQNum2) and latest DATE.
What I could do so far:
SELECT ID,Seqnum,Seqnum2,Max(Date)
GroupBY ID,Seqnum,Seqnum2
The above table has other columns I am interested in.
Thanks,
Raj.