ity Relationship Diagram for the system above. 2. Write query that would return the names and contacts of all Local students. 3. Write a query that would return names, contact and locations of all departments that has a location text with Ave 3 as part of it. [hint: use the LIKE clause with “_” or “%”] 4. What would be the result returned f
1. Design an Entity Relationship Diagram for the system above. 2. Write query that would return the names and contacts of all Local students. 3. Write a query that would return names, contact and locations of all departments that has a location text with Ave 3 as part of it. [hint: use the LIKE clause with “_” or “%”] 4. What would be the result returned for the following query: SELECT first_name, last_name, student_type.name, student_category.name FROM student, student_type, student_category WHERE stud_type_id = student_type.id AND stud_cat_id = student_category.id AND student_type.name = “Sandwich”;
5. Write a query that would present the first and last names, student type and category of all distance students. 6. What would be the result of the following query: SELECT student.id, first_name, last_name, contact, registration_type.name, course.code FROM student, registration, registration_type, course WHERE student.id = stud_id AND reg_type_id = registration_type.id AND registration_type.name = "re-sit" AND course_code = course.code;
7. Write a query that would return the names and date of birth of all students that have registration_type of Normal. 8. Write a query that would return the first names, last names, contacts and student types of all sandwich students.
9. What would be the results of this query: SELECT course_code, department.name department FROM course,registration, department WHERE course.dept_id = department.id AND course.code=course_code GROUP BY course_code ORDER BY course_code desc;
10. Write a query that would return the departments names and the number of courses registered from them.
Step by step
Solved in 4 steps with 1 images