Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ORACLE homework question.... Write a query that outputs the number of students in each school. Use aliases where appropriate. Sort by the number of students

ORACLE homework question....

Write a query that outputs the number of students in each school. Use aliases where appropriate. Sort by the number of students in descending order. The column headers should be SCHOOL_NAME and NUM_STUDENTS. Here is the table schema. image text in transcribed

SYSTEM.SCHOOLS SCHOOL_ID NUMBER SCHOOL_NAME VARCHAR2 (35 BYTE) ADDRESS VARCHAR2 (60 BYTE) CITY VARCHAR2 (15 BYTE) REGION VARCHAR2 (15 BYTE) POSTAL_CODE VARCHAR2 (10 BYTE) COUNTRY VARCHAR2 (15 BYTE) PRINCIPAL_ID NUMBER > SCHOOLS_PK (SCHOOL_ID) SCHOOL_PRINCIPAL_FK (PRINCIPAL_ID) SYSTEM.PEOPLE P PERSON_ID NUMBER IF SCHOOL_ID NUMBER * FIRST_NAME VARCHAR2 (10 BYTE) LAST_NAME VARCHAR2 (20 BYTE) + * BIRTH_DATE DATE ADDRESS VARCHAR2 (60 BYTE) CITY VARCHAR2 (15 BYTE) REGION VARCHAR2 (15 BYTE) POSTAL_CODE VARCHAR2(10 BYTE) COUNTRY VARCHAR2 (15 BYTE) - PEOPLE_PK (PERSON_ID) E SYS_C0021064 (SCHOOL_ID) SYSTEM.TEACHERS P TEACHER_ID NUMBER PERSON_ID NUMBER SUBJECT_ID NUMBER +-K SALARY NUMBER TEACHERS_PK (TEACHER_ID) SYS_C0021067 (PERSON_ID) SYS_C0021068 (SUBJECT_ID) SYSTEM.SUBJECTS IP SUBJECT_ID NUMBER SUBJECT VARCHAR2 (60 BYTE) SUBJECTS_PK (SUBJECT_ID) SYSTEM.PRINCIPALS IP PRINCIPAL_ID NUMBER PERSON_ID NUMBER SALARY NUMBER -> PRINCIPALS_PK (PRINCIPAL_ID) SYS_C0021074 (PERSON_ID) SYSTEM.STUDENTS P" STUDENT_ID NUMBER PERSON_ID NUMBER GRADE_LEVEL NUMBER STUDENTS_PK (STUDENT_ID) SYS_C0021071 (PERSON_ID) KA SYSTEM.CLASSROOMS P" CLASSROOM_ID NUMBER TEACHER_ID NUMBER SUBJECT_ID NUMBER SEMESTER VARCHAR2 (6 BYTE) YEAR NUMBER (4) - CLASSROOMS_PK (CLASSROOM_ID) SYS_C0021077 (TEACHER_ID) SYS_C002 1078 (SUBJECT_ID) P SYSTEM.CLASSROOM_STUDENTS CLASSROOM_STUDENT_ID NUMBER CLASSROOM_ID NUMBER STUDENT_ID NUMBER GRADE NUMBER 839394 CLASSROOM_STUDENTS_PK (CLASSROOM_STUDENT_ID) SYS_C0021082 (STUDENT_ID) SYS_C0021081 (CLASSROOM_ID)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

ISBN: 133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions

Question

How does the concept of hegemony relate to culture?

Answered: 1 week ago

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago