select * from testtable group by dept_id order by salary limit 5
limit 5是mysql的語法
回複:請教一個SQL QUERY的問題。謝謝!
所有跟帖:
•
Sorry about my incomplete info. I mean in oralce. Thank you for
-小蝦米-
♀
(0 bytes)
()
07/20/2009 postreply
10:32:52
•
回複:Sorry about my incomplete info. I mean in oralce. Thank you f
-小丹尼-
♂
(91 bytes)
()
07/20/2009 postreply
10:51:26
•
Thank you! I am reading some articles and they mentioned using R
-小蝦米-
♀
(0 bytes)
()
07/20/2009 postreply
11:01:29
•
對不起,這個sql語句有些問題,你先不要用
-小丹尼-
♂
(16 bytes)
()
07/20/2009 postreply
11:01:10
•
不好意思,前麵誤人子弟了。需要用ORACLE的分組排序
-小丹尼-
♂
(0 bytes)
()
07/20/2009 postreply
11:21:08
•
I figured it out, but used long and repeated query. I don't know
-小蝦米-
♀
(63 bytes)
()
07/20/2009 postreply
11:28:56
•
這個問題好像別人問過
-小丹尼-
♂
(144 bytes)
()
07/20/2009 postreply
11:43:06
•
看看這個方案
-小丹尼-
♂
(1477 bytes)
()
07/20/2009 postreply
11:46:26
•
You are awesome! I used RANK and make it work. THANK YOU!
-小蝦米-
♀
(0 bytes)
()
07/20/2009 postreply
12:07:29