Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a query that returns the following columns: Person's full name. Person's role at the school: principal, teacher, or student. Person's salary (or N/A for
Write a query that returns the following columns:
- Person's full name.
- Person's role at the school: principal, teacher, or student.
- Person's salary (or N/A for students).
- Person's school name.
SYSTEM.SCHOOLS P SCHOOL_ID SCHOOL_NAME ADDRESS CITY REGION POSTAL CODE COUNTRY NUMBER VARCHAR2 (35 BYTE) VARCHAR2 (60 BYTE) VARCHAR2 (15 BYTE) VARCHAR2 (15 BYTE) VARCHAR2 (10 BYTE) VARCHAR2 (15 BYTE) F PRINCIPAL_ID NUMBER SCHOOLS_PK (SCHOOL_ID) SCHOOL PRINCIPAL_FK (PRINCIPAL_ID) SYSTEM.PRINCIPALS IP * PRINCIPAL_ID F PERSON_ID SALARY NUMBER NUMBER NUMBER PRINCIPALS_PK (PRINCIPAL_ID) SYS_C0021074 (PERSON_ID) P F SYSTEM.PEOPLE PERSON_ID SCHOOL_ID * FIRST_NAME LAST_NAME BIRTH DATE ADDRESS CITY REGION POSTAL CODE COUNTRY PEOPLE_PK (PERSON_ID) SYS_C0021064 (SCHOOL_ID) CLASSROOM_ID NUMBER NUMBER VARCHAR2 (10 BYTE) VARCHAR2 (20 BYTE) DATE VARCHAR2 (60 BYTE) VARCHAR2 (15 BYTE) VARCHAR2 (15 BYTE) VARCHAR2 (10 BYTE) VARCHAR2 (15 BYTE) SYSTEM.STUDENTS P STUDENT_ID IF NUMBER PERSON_ID NUMBER GRADE_LEVEL NUMBER STUDENTS_PK (STUDENT_ID) SYS_C0021071 (PERSON_ID) SYSTEM.CLASSROOM_STUDENTS P CLASSROOM_STUDENT_ID F F STUDENT_ID GRADE NUMBER NUMBER NUMBER NUMBER CLASSROOM_STUDENTS_PK (CLASSROOM_STUDENT_ID) SYS_C0021082 (STUDENT_ID) SYS_C0021081 (CLASSROOM_ID) SYSTEM.TEACHERS P * TEACHER_ID NUMBER F F PERSON_ID NUMBER SUBJECT_ID NUMBER SALARY NUMBER TEACHERS_PK (TEACHER_ID) SYS_C0021067 (PERSON_ID) SYS_C0021068 (SUBJECT_ID) P F F SYSTEM.SUBJECTS P SUBJECT_ID NUMBER SUBJECT VARCHAR2 (60 BYTE) SUBJECTS_PK (SUBJECT_ID) tt SYSTEM.CLASSROOMS CLASSROOM_ID TEACHER_ID SUBJECT_ID SEMESTER YEAR NUMBER NUMBER NUMBER VARCHAR2 (6 BYTE) NUMBER (4) CLASSROOMS_PK (CLASSROOM_ID) SYS_C0021077 (TEACHER_ID) SYS_C0021078 (SUBJECT_ID)
Step by Step Solution
★★★★★
3.46 Rating (156 Votes )
There are 3 Steps involved in it
Step: 1
Answer The query is as follow SELECT CONCATPfirstname Plastname AS Persons f...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started