Create a sql statement query


Discuss the below:

Create a SQL statement to query the COURSE_NAME, CLIENT_NAME, and GRADE from the COURSE, COURSE_ACTIVITY, and CLIENT tables and order the results by course name and within the same course by client name.

CREATE TABLE CLIENT (
CLIENT_NO CHAR(8) PRIMARY KEY,
CLIENT_COMPANY VARCHAR(35) NOT NULL,
CLIENT_NAME VARCHAR(35) NOT NULL,
CLIENT_EMAIL VARCHAR(35),
CLIENT_PROGRAM CHAR(3) NOT NULL,
CLIENT_SCORE NUMBER NOT NULL);

CREATE TABLE COURSE (
COURSE_CODE CHAR(8)PRIMARY KEY,
COURSE_NAME VARCHAR(35) NOT NULL,
COURSE_DATE DATE NOT NULL,
COURSE_INSTRUCTOR VARCHAR(35) NOT NULL,
COURSE_LOCATION VARCHAR(20) NOT NULL);

CREATE TABLE COURSE_ACTIVITY (
ACTIVITY_CODE CHAR(8) PRIMARY KEY,
CLIENT_NO CHAR(8) NOT NULL,
COURSE_CODE CHAR(8) NOT NULL,
GRADE CHAR(1),
INSTR_NOTES VARCHAR (50));

Solution Preview :

Prepared by a verified Expert
PL-SQL Programming: Create a sql statement query
Reference No:- TGS01938986

Now Priced at $25 (50% Discount)

Recommended (94%)

Rated (4.6/5)