Question
using this schema answer: 1) to display the sum of marks and sum of max mark for each student for each course. (the sum of
using this schema answer:
1)
to display the sum of marks and sum of max mark for each student for each course. (the sum of marks and sum of total marks are concatenated in the format: sum marks/sum max marks):
a.
select full_name ,course_id, concat(sum(mark),'/' || sum(max_mark)) as "total marks" from students join exam_results on(students.id = exam_results.student_id) group by full_name,course_id;
b.
select full_name ,course_id, concat(sum(mark),'/' || sum(max_mark)) as "total marks" from students join exam_results using(student_id) group by full_name,course_id;
c.
select course_id, sum(mark) as "total marks" from exam_results group by course_id;
d.
None of the answers.
2)
The query that displays the students names and their teachers names for the courses they registered:
a.
select full_name , teacher_name from students join teachers on(id=teacher_id);
b.
select full_name , teacher_name from students join registration using(student_id) join teachers using(teacher_id);
c.
select full_name , teacher_name from students join registration on(id=student_id) join teachers using(teacher_id);
d.
None of the above.
3)
Based on the data inserted in the university database given, how many rows will be updated after executing the following query: update exam_results set mark=max_mark/2 where student_id in (select student_id from registration where semester_id=20202) and exam_name='final exam';
a.
3 rows updated
b.
6 rows updated
c.
0 rows updated.
d.
Makes error
Exam_results Majors Major_id: number(3) Major_name: varchar2(50) Department_name: varchar2(50) Faculty:varchar2(50) Student_id: number(10) Course_id: number(10) Exam_name: varchar2(50) Max_mark: number(5,2) Mark:number(5,2) courses Students Course_id: number(10) Course_name:varchar21 100) Credit_hours:number(2) Course_level:number(2) Teachers Teacher_id: number(5) Teacher_name:varchar2 (50) Department_name:varc har2(10) ID: Number(10) Full_name: Varchar2(50) Address: varchar2(50) Bd:date Gender: char(1) Major_id: number(3) Registration_date: date Semester Semester_id: number(5) Start_date: date End_date: date Description:varchar2(50) Registration Student_id: number(10) Course_id: number(10) Semester_id: number(5) Teacher_id: number(5) Result_number: number(5,2) Result_letter: char(1)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started