Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Student Table

STUDENT_ID FIRST_NAME LAST_NAME GPA ENROLLMENT_DATE MAJOR

201 Shivansh Mahajan 8.79 2021-09-01 Computer


Science

202 Umesh Sharma 8.44 2021-09-01 Mathematics

203 Rakesh Kumar 5.60 2021-09-01 Biology

204 Radha Sharma 9.20 2021-09-01 Chemistry

205 Kush Kumar 7.85 2021-09-01 Physics

206 Prem Chopra 9.56 2021-09-01 History

207 Pankaj Vats 9.78 2021-09-01 English

208 Navleen Kaur 7.00 2021-09-01 Mathematics

Program Table

STUDENT_REF_ID PROGRAM_NAME PROGRAM_START_DATE

201 Computer Science 2021-09-01

202 Mathematics 2021-09-01

208 Mathematics 2021-09-01

205 Physics 2021-09-01

204 Chemistry 2021-09-01

207 Psychology 2021-09-01

206 History 2021-09-01

203 Biology 2021-09-01

Scholarship Table

STUDENT_REF_ID SCHOLARSHIP_AMOUNT SCHOLARSHIP_DATE

201 5000 2021-10-15

202 4500 2022-08-18


203 3000 2022-01-25

201 4000 2021-10-15

1. Write a SQL query to fetch “FIRST_NAME” from the Student table in upper
case
2. Write a SQL query to print the FIRST_NAME and LAST_NAME from Student
table into single column COMPLETE_NAME. (use concat)
3. Write a SQL query to print all Student details from Student table order by
FIRST_NAME Ascending and MAJOR Subject descending .
4. Write a SQL query to print details of the Students with the FIRST_NAME as
‘Prem’ and ‘Shivansh’ from Student table.
5. Write an SQL query to fetch the count of Students having Major Subject
‘Computer Science’
6. Write an SQL query to fetch Students full names with GPA >= 8.5 and <= 9.5.
7. Write an SQL query to fetch the no. of Students for each MAJOR subject in the
descending order.
8. Write an SQL query to show only even rows from Student table.
9. Write an SQL query to show the top n (say 5) records of Student table order by
descending GPA.
10. Write an SQL query to determine the nth (say n=5) highest GPA from a table.
11. Write an SQL query to determine the 5th highest GPA without using LIMIT
keyword.
12. Write an SQL query to fetch the list of Students with the same GPA.

You might also like