You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2. the log will show message that mysql server is ready for connection
3. make sure check docker container is running
docker ps
4. connect to mysql server using docker bash interactive
docker exec -i -t 4b6ed87f74c5 /bin/bash
5. connect to mysql server using password defined in env file
6. check if the database and all tables contains data
simple sql queries for analysis
1. Select All students, Lecturers, and ongoing Class
SELECT CONCAT(st.FirstName,'',st.LastName) StudentName, StudentPhone, CourseName,
CONCAT(lc.FirstName,'',lc.LastName) LecturerName, LecturerPhone, DepartmentName, Location
FROM Student st INNER JOIN Class cl ONst.ID=cl.StudentIDINNER JOIN Course co ONcl.CourseID=co.IDINNER JOIN Lecturer lc ONco.LecturerID=lc.IDINNER JOIN Department dp ONlc.DepartmentID=dp.ID;
2. Select Total Course by Lecturer
SELECT CONCAT(lc.FirstName,'',lc.LastName) LecturerName, COUNT(*) CourseTotal
FROM Lecturer lc
LEFT JOIN Course co ONlc.ID=co.LecturerIDGROUP BY1ORDER BY2DESC;
3. Select Total Course by Student
SELECT CONCAT(st.FirstName,'',st.LastName) StudentName, COUNT(*) CourseTotal
FROM Student st LEFT JOIN Class cl ONst.ID=cl.StudentIDINNER JOIN Course co ONcl.CourseID=co.IDGROUP BY1ORDER BY2DESC;
4. Select Course Name by Total Student and Total Lecturer
SELECT CourseName,COUNT(StudentID) StudentTotal, COUNT(LecturerID) LecturerTotal
FROM Course co
LEFT JOIN Class cl ONco.ID=cl.CourseIDLEFT JOIN Student st ONcl.StudentID=st.IDGROUP BY1ORDER BY2DESC;