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

write 8 SQL queries to get usuful information from the following student databas

ID: 3829599 • Letter: W

Question

write 8 SQL queries to get usuful information from the following student database. Please explain your query and be clear. I will upvote clear answer. Thanks

create table student( student_num varchar2(10) PRIMARY KEY, Fname varchar2(20), Lname varchar2(20),
age decimal(5,2), GPA REAL, CHECK (GPA>=0.00), CHECK (GPA<=4.00), gender varchar2(10),
major varchar2(30), year varchar2(20));


create table address( s_number varchar2(10) references student(student_num), street varchar2(20),
city varchar2(20), state varchar2(20), zipcode number(10), country varchar2(20));

create table instructor ( I_id varchar2(10) PRIMARY KEY, name varchar2(20),
dept varchar2(20));

create table section( SectionNumber varchar2(10) PRIMARY KEY, term varchar2(10), year number(10),
location varchar2(20), s_id varchar2(10) references student(student_num),
instructor_id varchar2(10) references instructor(I_id));

create table course( course_num varchar2(10) PRIMARY KEY, name varchar2(20),
creditHours number(5), section_id varchar2(10) references section(SectionNumber));

Explanation / Answer

a.select * from student;

it will display all the details of the student table;

b.select * from address;

it will display all the details of the address table;

c.select * from instructor;

it will display all the details of the instructor table;

d.select * from section;

it will display all the details of the section table;

e.select * from course;

it will display all the details of the course table;

f.select * from address where country=<selected name>;

it will display all the details of the address table where the country matches in the given query with the data in the table;

g.select * from student where major=<value>;

it will display all the details of the student table where the major matches in the given query with the data in the table.;

h.select * from insructor where dept=<value>;

it will display all the details of the instructor table where the dept matches in the given query with the data in the table;