Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I have developed the database with the following tables: STUDENT S_ID PRIMARY KE

ID: 3645241 • Letter: I

Question

I have developed the database with the following tables:
STUDENT
S_ID PRIMARY KEY
S_FNAME
S_LNAME
S_ADDRESS
S_CITY
S_STATE
S_ZIPCODE
S_PHONE

SCHOLARSHIPS
S_ID PRIMARY KEY FOREIGN KEY REFERENCES STUDENT
SC_MAJOR
SC_ACADEMIC
SC_ATHLETIC

GPA
S_ID PRIMARY KEY FOREIGN KEY REFERENCES STUDENT
G_GPA
G_CLASS /*(4 is for Seniors)*/

I then inputted data and did the following SQL query:
SELECT S_ID, S_LNAME, S_FNAME, S_ADDRESS, S_CITY, S_STATE, S_ZIPCODE, S_PHONE
FROM STUDENT
WHERE GPA.G_CLASS = 4
ORDER BY S_LNAME, S_FNAME;

I get the following error:
The data content could not be loaded. Column not found: GPA.G_CLASS.

Please assist with any tutoring or assisting. Thank you.

Explanation / Answer

You're getting this error as GPA is a separate table and GPA.G_CLASS is not found in Student table. To execute your query, you need to join both tables, so try executing this - SELECT S_ID, S_LNAME, S_FNAME, S_ADDRESS, S_CITY, S_STATE, S_ZIPCODE, S_PHONE FROM STUDENT, GPA WHERE GPA.G_CLASS = 4 ORDER BY S_LNAME, S_FNAME;