附nice2u的CODE, 在SAS环境下也work了.
select min(begdate),enddate
from (
select begdate,
enddate
from sometable
where enddate = (
select max(enddate)
from sometable
)
)
group by
enddate
非常感谢 nice2u回答了我问的SQL问题, it works!
所有跟帖:
•
u r welcome
-cowgg-
♂
(0 bytes)
()
11/30/2009 postreply
20:11:30
•
学习。没想到sql这么powerful
-tigersclaws-
♂
(18 bytes)
()
11/30/2009 postreply
21:42:27
•
这跟
-烟仔哥-
♂
(72 bytes)
()
12/01/2009 postreply
10:10:07
•
对应每个满足条件的endate,找到对应的,最早的begindate
-猪不才-
♀
(0 bytes)
()
12/01/2009 postreply
10:35:44
•
if looks like if...
-HappyNow?!-
♂
(101 bytes)
()
12/01/2009 postreply
10:36:42
•
:)
-烟仔哥-
♂
(0 bytes)
()
12/01/2009 postreply
11:35:08
•
sorry, you are right. They are the same thing unless
-猪不才-
♀
(22 bytes)
()
12/01/2009 postreply
10:44:23
•
Tel. # again? -- -:)))!!!
-HappyNow?!-
♂
(0 bytes)
()
12/01/2009 postreply
10:53:47
•
呵呵,那你承认了先?
-猪不才-
♀
(0 bytes)
()
12/01/2009 postreply
10:58:45
•
那应该用sometable and someothertable,这就不会混肴了
-烟仔哥-
♂
(0 bytes)
()
12/01/2009 postreply
11:34:35
•
can u elaborate ur issue again?
-撅着挺好-
♂
(41 bytes)
()
12/01/2009 postreply
14:24:40
•
回复:非常感谢 nice2u回答了我问的SQL问题, it works!
-jinyouzi-
♀
(151 bytes)
()
12/01/2009 postreply
18:36:07