作者cyril63 (陽光 海與沙灘)
看板PHP
標題[問題] 請問一個SQL
時間Fri Jun 2 18:55:35 2006
※ [本文轉錄自 Web_Design 看板]
作者: cyril63 (陽光 海與沙灘) 看板: Web_Design
標題: [問題] 請問一個SQL
時間: Fri Jun 2 18:55:14 2006
成績表
Person Course Score
=============================
P1 Chinese 95
P1 English 80
P1 Math 76
P1 History 45
P2 English 56
P2 Math 78
P2 Chinese 98
P3 English 67
P3 Math 87
P4 Chinese 65
P4 English 98
P4 Math 54
P4 History 66
想用一個SQL 挑出每個人最高成績的那一筆紀錄 如下表
Person Course Score
=============================
P1 Chinese 95
P2 Chinese 98
P3 Math 87
P4 English 98
SQL該如何下呢
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.116.163.20
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.116.163.20
1F:→ lazyhome:就order by Score desc limit 0,5 不難吧,自己試試看吧! 06/02 19:33
2F:→ lazyhome:抱歉 ... 整個沒看清楚,我樓上那個不是你要的,抱歉... 06/02 19:35