NAME: Pratibha Rana
UNIVERSITY ROLLNO : 2215001306
SEC: AJ
ROLL NO: 15
DBMS LAB ASSIGNMENT 4
CREATE THE FOLLOWING TABLES AND
INSERT THE VALUES :-
Write SQL Queries for the following:
1. Count the total number of Students.
2. Calculate the average GPA of all Student.
3. Determine the minimum and maximum GPA. Rename the
titles as ‘max_GPA’ and ‘min_GPA’ respectively.
4. Count the number of students having GPA greater than or
equal to 3.7.
[Link] Maximum, Average, Minimum, total GPA of all student.
6. Find total number of colleges in our Application
Database.
7. Find how many different majors student had applied
in.
8. Find total no. of Applications in our Application
System’s Database.
9. Find average of all distinct GPA.
10. Display the total number of application accepted.
11. Find number of students having GPA>3.4 and coming
from high school having size>1000.
12. Find how many student applied to ‘marine biology’.
13. Find how many applications were rejected and
accepted by the colleges.
14. Find how many students applied to a particular major.
(show count(sid) as No_of_applications).
15. Find number of applications received by particular
college.
16. Find number of applications received in a particular
major at a particular college.
17. Give the college name and major, where number of
applications received are greater than or equal to 2.
18. Give the name and no of applications of all those
colleges which receives applications from 3 or more
students.
19. Give state and number of colleges of a state that has
more than 1 college.
20. Find the name of students that are duplicate.
21. Find how many applications are filed by each student.
22. Provide name of students that file 3 or more
applications.
23. Provide name of student who have not applied to any
college.
24. Find maximum GPA, Average GPA, and minimum
GPA among applicants of each college. (i.e. say sID 123, 324
and 987 had applied to Berkley then compute and display
max GPA among these three).
25. Find how many student have same GPA among all
students. (provide this frequency in two column table as
GPA 3.9 is 4 times, GPA 2.9 is 2 times ).
26. Find how many student have their name started from
A, B or C.