Here's what I have so far:

SELECT DISTINCT Min("gpa"."current_gpa"),
FROM   "students",
WHERE  "students"."id" = "gpa"."id"
HAVING (( Min("gpa"."current_gpa") = 3.25 ))
ORDER  BY Min("gpa"."current_gpa") ASC,
          "students"."lastname" ASC,
          "students"."firstname" ASC 

I'm getting an error with

HAVING ( ( MIN( "GPA"."Current_GPA" ) = 3.25 ) ) 

Here's what I'm trying to do:

I'm required to use Open Office...

I have two tables, one table (GPA) with a Current_GPA column and an ID column as the primary key between the two tables.

The second table has last name, first name, and ID. I'm trying to extract all the GPAs that are a minimum of 3.25, Last, and First name from the two tables.

Also I need to sort by GPA, then Last name, then first name...


1 Answer 1


HAVING comes always with a GROUP BY clause. This join should be in the WHERE clause whereby the MIN function is calculated in a synchronized sub-query.

You must log in to answer this question.