資料庫SQL問題 - 考試
By Emily
at 2013-05-28T16:21
at 2013-05-28T16:21
Table of Contents
請問一下,我想要查詢每個id的date最晚時間!
可是我寫下面的SQL指令,為什麼會全部時間
都印出來?是哪裡有錯誤??
selsct id,jobtitle,max(data)
from job
group by id,jobtitle
印出:
-------------------------
id jobtitle max(date)
-------------------------
01 mm 2011-02-03
01 vv 2012-02-03
02 xx 2012-04-09
02 dd 2012-09-12
如果我想要印出的是下面那個表格,
那我的SQL要修改哪個部分??
-------------------------
id jobtitle max(date)
-------------------------
01 vv 2012-02-03
02 dd 2012-09-12
麻煩知道的大大說明一下,感謝><....
--
可是我寫下面的SQL指令,為什麼會全部時間
都印出來?是哪裡有錯誤??
selsct id,jobtitle,max(data)
from job
group by id,jobtitle
印出:
-------------------------
id jobtitle max(date)
-------------------------
01 mm 2011-02-03
01 vv 2012-02-03
02 xx 2012-04-09
02 dd 2012-09-12
如果我想要印出的是下面那個表格,
那我的SQL要修改哪個部分??
-------------------------
id jobtitle max(date)
-------------------------
01 vv 2012-02-03
02 dd 2012-09-12
麻煩知道的大大說明一下,感謝><....
--
Tags:
考試
All Comments
By Skylar Davis
at 2013-05-30T22:38
at 2013-05-30T22:38
By Dora
at 2013-06-02T08:57
at 2013-06-02T08:57
By Dora
at 2013-06-06T11:32
at 2013-06-06T11:32
By Olive
at 2013-06-10T02:56
at 2013-06-10T02:56
By Anthony
at 2013-06-12T09:02
at 2013-06-12T09:02
By Erin
at 2013-06-12T16:07
at 2013-06-12T16:07
By Zanna
at 2013-06-15T18:24
at 2013-06-15T18:24
By James
at 2013-06-19T07:41
at 2013-06-19T07:41
Related Posts
文科申論題的國內人名
By Mason
at 2013-05-28T15:47
at 2013-05-28T15:47
運輸學考題詢問
By Lily
at 2013-05-28T14:44
at 2013-05-28T14:44
102年鐵路特考增列
By Valerie
at 2013-05-28T14:28
at 2013-05-28T14:28
憲法第118條
By Edward Lewis
at 2013-05-28T14:00
at 2013-05-28T14:00
請問這狀況刑法的法條是?
By Mary
at 2013-05-28T13:59
at 2013-05-28T13:59