我有三个表SQL集团通过最新的入门
table1
PCName PCID
PC1 001
PC2 002
PC3 003
table2
PCID LastOnline
001 01.02.13
002 05.01.13
003 04.03.13
table3
PCID PatchInstall
001 03.02.13
001 05.02.13
001 01.02.13
002 06.02.13
002 08.02.13
003 01.02.13
003 09.02.13
003 10.02.13
I can get the information together like this
PCID PCName LastOnline PatchInstall
001 PC1 01.02.13 03.02.13
001 PC1 01.02.13 05.02.13
001 PC1 01.02.13 01.02.13
002 PC2 05.01.13 06.02.13
002 PC2 05.01.13 08.02.13
003 PC3 04.03.13 01.02.13
003 PC3 04.03.13 09.02.13
003 PC3 04.03.13 10.02.13
但我想只有对每个PC纪录最近PatchInstall日期。我试图用GROUP BY命令做,但没有任何运气。
有没有人知道如何让它成为可能?
哪些DBMS为Y ou使用?甲骨文? Postgres的? – 2013-03-25 09:38:23