SSISO Community

시소당

7. 불용카드 수를 구하여라.

본인의  카드와  가족의  카드를  연관하여  일정기간  사용하지  않은  카드의  번호를  조회한다.

Select  카드번호
from  카드정보  a
where  not  exits  (  select  ‘x’  
                                                          from  카드정보  b
                              where  exits  (select  ‘x’  from  카드사용실적  c
                                where  c.카드번호  =  b.카드번호)
                                                            start  with  b.카드번호  =  nvl(a.본인카드번호,  A.카드번호)
                                                            connect  by  prior  b.카드번호  =  b.본인카드번호);

1071 view

4.0 stars