作者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