Dbm Chapter Solution

Write SQL queries to answer the following questions: a. What are the courses included in the Section table? List each course only once. SELECT DISTINCT CourseID FROM Section_T; b. List all students in alphabetical order by StudentName. SELECT StudentID, StudentName FROM Student_T ORDER BY StudentName; c. List the students who are enrolled in each course in Semester I, 2008. Group the students by the sections in which they are enrolled. SELECT StudentID, SectionNo FROM Registration_T WHERE Semester = ‘I-2008’ GROUP BY SectionNo; d. List the courses available. Group them by course prefix. SELECT CourseID, CourseName FROM Course_T GROUP BY CourseID ORDER BY CourseID;