Completed
Incomplete
Not Attended
Completed
Incomplete
Not Attended
Evergreen High School has recently digitized its academic records and needs your help managing the new database. As their SQL consultant, you're tasked with writing queries to assist the administration, teachers, and students in accessing and updating important academic information. The database consists of three tables: 'students' for student information, 'courses' for course details, and 'enrollments' to track which students are enrolled in which courses and their grades. Your job is to provide insights and help streamline the school's academic processes.
The school counselor needs a list of all students in grade 11, along with their email addresses, to send out information about college preparation workshops. Can you provide this list?
The school wants to recognize high-achieving students. Can you find all students who have received an 'A' grade in any course, and display their names along with the course names they excelled in?
The school realizes that the Physics course should be worth 5 credits instead of 4. Update the credits for the Physics course, and then display all course information to confirm the change.
The administration wants to know which courses have the highest enrollment. Can you provide a list of courses along with the number of students enrolled in each, sorted by enrollment count in descending order?
A new student, Frank White (id: 6, grade: 10, email: [email protected]), has joined the school and wants to enroll in Algebra and Literature. Add Frank to the students table, enroll him in these courses with today's date as the enrollment date, and then display his enrollment information. (Assume today's date as '2024-12-20')
id | name | grade | |
---|---|---|---|
1 | Alice Johnson | 10 | [email protected] |
2 | Bob Smith | 11 | [email protected] |
3 | Charlie Brown | 10 | [email protected] |
4 | Diana Ross | 12 | [email protected] |
5 | Ethan Hunt | 11 | [email protected] |
id | name | instructor | credits |
---|---|---|---|
101 | Algebra | Mr. Thompson | 3 |
102 | Biology | Mrs. Garcia | 4 |
103 | History | Ms. Lee | 3 |
104 | Physics | Dr. Brown | 4 |
105 | Literature | Mrs. Davis | 3 |
student_id | course_id | enrollment_date | grade |
---|---|---|---|
1 | 101 | 2023-09-01 | A |
1 | 102 | 2023-09-01 | B |
2 | 103 | 2023-09-02 | A |
2 | 104 | 2023-09-02 | C |
3 | 101 | 2023-09-01 | B |
3 | 105 | 2023-09-03 | A |
4 | 102 | 2023-09-02 | A |
4 | 104 | 2023-09-02 | B |
5 | 103 | 2023-09-03 | B |
5 | 105 | 2023-09-03 | A |
>>> Submit Your Query to validate