![](//teradataforum.com/imgs/ptdfw1.gif) |
![](//teradataforum.com/imgs/ptdfw2.gif) |
Archives of the TeradataForum
Message Posted: Fri, 25 Feb 2011 @ 13:58:15 GMT
Subj: | | Re: Recurisve query - Minimum Bookmarks |
|
From: | | Muppala_Suresh |
Please check below query :
create table suresh_test
( RPT_ID int , Bookmark char(10))
insert into suresh_test values (100, 'A');
insert into suresh_test values (100, 'B');
insert into suresh_test values (101, 'C');
insert into suresh_test values (101, 'D');
insert into suresh_test values (102, 'A');
insert into suresh_test values (103, 'B');
insert into suresh_test values (103, 'C');
insert into suresh_test values (103, 'D');
select min(rpt_id),min(Bookmark) from suresh_test group by rpt_id
Result:
100 A
103 B
102 A
101 C
| |