You are on page 1of 2

EXERCISE 6: SQL Joins

Faculty Name: Dr. Abishi Chowdhury

Lab Slot: L9+L10

Class Number: CH2022232500817


Subject: Database System Lab (BCSE302P)

Date: 23/05/2023
Due Date for Submission: 26/05/2023

1. Create the following relations:


Student (sID: int, sName: varchar2(10), CGPA: int, city: varchar2(15),
phone_number: int)
Apply (sID: int, cName: varchar2(20), stream: varchar2(10))
College(cName: varchar2(20), state: varchar2(15))

2. Insert 10 tuples in each of Student and Apply relation. Insert 6 tuples in


College relation.

Write SQL queries for the following:


3. Produce a combine table in which each student is combine with every other
application.
4. Give Student ID, name, CGPA and name of college and stream each
student applied to.
5. Find detail of applications who applied to Tamil Nadu state.
6. IDs, name, CGPA of students and name of college with CGPA > 8 applying
to VIT.
7. Find detail of student who have not applied to any of college.
8. Find college where no student has applied.
NOTE: While creating any new table suffix your first name
along with last two digits of your registration number.
Eg: STUDENT_Abishi94

You might also like