[問題] 請問一個SQL

看板PHP作者 (陽光 海與沙灘)時間18年前 (2006/06/02 18:55), 編輯推噓0(002)
留言2則, 1人參與, 最新討論串2/5 (看更多)
※ [本文轉錄自 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

06/02 19:33, , 1F
就order by Score desc limit 0,5 不難吧,自己試試看吧!
06/02 19:33, 1F

06/02 19:35, , 2F
抱歉 ... 整個沒看清楚,我樓上那個不是你要的,抱歉...
06/02 19:35, 2F
文章代碼(AID): #14W1ae6q (PHP)
文章代碼(AID): #14W1ae6q (PHP)