Many thanks! Ismo's reply solved the problem, and Tom's reply solved another one.
Marko Ismo Tuononen wrote:
select studentid,max(score) from studentprofile group by studentid;
On 20/02/07, Tom Lane <[EMAIL PROTECTED]> wrote:
The optimal index for this would be on studentprofile(studentid,score).
---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq