4 tables join Oracle – Code Review Stack Exchange

I have 4 tables and I am trying to join them. it does not work yet.

Hello community.

I have 4 tables and I am trying to join them. it does not work yet. I must contact this user to be able to retrieve the first and last name of the engineer, the name and email of the faculty, as well as the subject and title of the class for each course registration.

CREATE TABLE Engineers(
EID NUMBER,
Lastname varchar2(50),
Firstname varchar2(50),
Email varchar2(50),
Graddate DATE,
PRIMARY KEY(EID)
);

CREATE TABLE Faculty(
FID NUMBER,
Lastname varchar2(50),
Firstname varchar2(50),
Email varchar2(50),
Hiredate DATE,
PRIMARY KEY(FID)
);


CREATE TABLE Classes(
CID NUMBER,
Subject varchar2(50),
Catalognbr varchar2(50),
Title varchar2(50),
PRIMARY KEY(CID)
);

CREATE TABLE ClassEnrollments(
EnID NUMBER PRIMARY KEY,
EID NUMBER NOT NULL,
FID NUMBER NOT NULL,
CID NUMBER NOT NULL,
CONSTRAINT fk_engineers
    FOREIGN KEY (EID)
    REFERENCES Engineers(EID) ON DELETE CASCADE,
CONSTRAINT fk_faculty
    FOREIGN KEY (FID) 
    REFERENCES Faculty(FID) ON DELETE CASCADE,
CONSTRAINT fk_classes
    FOREIGN KEY (CID) 
    REFERENCES Classes(CID) ON DELETE CASCADE
);

and that the request I came up with:

SELECT
    EnID,
    Engineer.Lastname AS Lastname,
    Engineer.Firstname AS Firstname,

    Faculty.Lastname AS Flastname,
    Faculty.Email AS email,
    Classes.Subject AS Subject,
    Classes.Title AS Title,
FROM
    ClassEnrollments
INNER JOIN Engineer ON Engineer.EID = ClassEnrollments.EID
INNER JOIN Faculty ON Engineer.FID = ClassEnrollments.FID
INNER JOIN Classes ON Engineer.CID = ClassEnrollments.CID;