lulubell-b
asked on
Retrieving column that has a MAX(value) in another column.
Hello,
I'm trying to build this query to give me the element that the sequence number is the greatest value.
For example,
I have two records:
DST_NM SEQ_NUM
New York 1
Cleveland 2
I need to select the DST_NM with the MAX(SEQ_NUM).
Results:
Select DST_NM , MAX(SEQ_NUM) FROM Table
GROUp by DST_NM
= Cleveland 2
I don't know what I'm doing wrong :)
Thanks
I'm trying to build this query to give me the element that the sequence number is the greatest value.
For example,
I have two records:
DST_NM SEQ_NUM
New York 1
Cleveland 2
I need to select the DST_NM with the MAX(SEQ_NUM).
Results:
Select DST_NM , MAX(SEQ_NUM) FROM Table
GROUp by DST_NM
= Cleveland 2
I don't know what I'm doing wrong :)
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER