SQL Practice
SQL Practice
10. List the names of students and their ages, ordered by age descending.
11. Show each student's name and the total number of courses they are enrolled in.
12. List the course name and the number of students enrolled in it.
16. List all courses along with student names who are enrolled.
21. Find the product with the highest total sales revenue.
22. Show students who have never received a grade (i.e. NULL grade).
23. List students enrolled in the course with the most credits.
24. Show students who enrolled in 2021 and are taking courses in the Econ department.
25. Show average grade per course (treat A=4, B=3, C=2, D=1, F=0).
29. Find all sales where quan ty > average quan ty sold.
32. For each student, list number of courses and average grade.
36. For each major, show the student with the most enrollments.
37. Show courses that are enrolled by both Student A and Student B.
42. Show the product with the lowest total quan ty sold.
43. For each day, find the product with the highest sales.
45. Show students who improved their grades across mul ple courses.
50. Create a leaderboard of top students by GPA using custom grading scale.