0% found this document useful (0 votes)
7 views

SQL Technical Test Question

Test questions

Uploaded by

Faizan Dange
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

SQL Technical Test Question

Test questions

Uploaded by

Faizan Dange
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

SQL

Technical Test Question

1) Create 3 table add some demo data inside that-:

a) students table inside that table coloumn (Note while adding demo data students
teacher_id null in 1 record)
student_id is primary key
student_name
teacher_id
admission_date
b) teachers inside that table coloumn
teacher_id INT is primary key
teacher_name
c) grades inside that table coloumn
grade_id is primary key
student_id is Foreign key
subject
grade

2) Retrieve the names of all students along with their respective teacher names.
3) Display the names of students who have grades in the subject 'Math' and their
corresponding grades.
4) List all teachers and the count of students they have, even if they have no
students.
5) Calculate the average grade for each subject across all students.
6) Find the names of students who have grades higher than the average grade in the
subject 'Science.'
7) Retrieve the names of students along with their teacher names. For students
without a teacher, display "No Teacher."
8) Get the names of students, their respective teacher names, and the subjects they
have grades in.
9) Display the names of students who share the same teacher.
10) List all grades along with the student names and subject, ensuring that only
valid student IDs are displayed.
11) Find the names of students who were admitted before '2022-01-01' and have
grades in any subject.

You might also like