Questions
Questions
1. Get all entries with marks higher than the average marks.
2. Get the names of students with the highest marks.
3. Get the lowest marks for each year.
4. Get the total count of entries for each caste.
5. Get the count of unique years.
6. Get the entries where the marks are equal to the lowest marks in 2022.
7. Get the average marks for males (M).
8. Get the names of students with marks less than the highest marks in 2023.
9. Get all entries from the city with the highest average marks.
10. Get the total marks for each gender.
11. Get all entries with marks less than the average marks.
12. Get the names of students with the lowest marks.
13. Get the highest marks for each year.
14. Get the total count of entries for each region.
15. Get the entries where the marks are equal to the highest marks in 2021.
16. Get the average marks for females (F).
17. Get the names of students with marks greater than the lowest marks in
2023.
18. Get all entries from the city with the lowest average marks.
19. Get the total marks for each caste.
20. Get the average marks for each year.
1. Get the names of students with marks greater than the highest marks of
2024.
2. Get the average marks for each city where the marks are higher than the
average marks.
3. Get the names and marks of the top 5 students for each year.
4. Get the highest marks for each caste.
5. Get the names of students with marks in the top 10% for their caste.
6. Get the city with the highest count of entries.
7. Get the average marks for each year where the marks are higher than the
average marks for that year.
8. Get the total marks for each city where the marks are greater than 80.
9. Get the names of students with marks greater than the highest marks of
their gender.
10. Get the lowest marks for each city where the marks are less than the
average marks for that city.
11. Get the names of students with marks higher than the average marks for
their region.
12. Get the names of students with the highest marks in each caste and region.
13. Get the average marks for each gender and region where the marks are
higher than the average marks.
14. Get the count of entries for each year where the marks are higher than the
average marks for that year.
15. Get the names of students with marks higher than the highest marks for
their city.
16. Get the total marks for each year where the marks are higher than the
average marks for that year.
17. Get the names of students with marks greater than the highest marks of
their caste.
18. Get the average marks for each city where the marks are higher than the
highest marks for that city.
19. Get the count of entries for each caste and region where the marks are
higher than the average marks for their caste.
20. Get the names of students with marks higher than the average marks for
their year and city.
3. Get the names of students with marks higher than the average marks for
their year and region.
4. Get the total marks for each caste and gender where the marks are higher
than the average marks for their caste.
5. Get the average marks for each year and city where the marks are higher
than the average marks for their year.
6. Get the count of entries for each gender and region where the marks are
higher than the highest marks for their gender.
7. Get the names of students with marks higher than the highest marks for
their caste and region.
8. Get the total marks for each year and city where the marks are higher than
the average marks for their year.
9. Get the average marks for each caste and gender where the marks are
higher than the highest marks for their caste.
10. Get the count of entries for each year and region where the marks are
higher than the average marks for their year.
11. Get the names of students with marks higher than the highest marks for
their year and caste.
12. Get the total marks for each gender and region where the marks are higher
than the average marks for their gender.
13. Get the average marks for each caste and city where the marks are higher
than the average marks for their caste.
14. Get the count of entries for each year and city where the marks are higher
than the highest marks for their year.
15. Get the names of students with marks higher than the highest marks for
their year and region.
16. Get the total marks for each caste and region where the marks are higher
than the average marks for their caste.
17. Get the average marks for each gender and city where the marks are higher
than the highest marks for their gender.
18. Get the count of entries for each year and gender where the marks are
higher than the average marks for their year.
19. Get the names of students with marks higher than the highest marks for
their caste and city.
20. Get the total marks for each year and region where the marks are higher
than the highest marks for their year.
Sample Tables
Students Table
student_id student_name age major
2 Bob 21 Mathematics
3 Charlie 22 Physics
4 David 20 Biology
5 Eve 21 Chemistry
Scores Table
score_id student_id subject score
1 1 Math 85
2 1 Science 90
3 2 Math 78
4 2 Science 82
5 3 Math 88
6 3 Science 91
7 4 Math 72
8 4 Science 75
9 5 Math 89
10 5 Science 94
2. Get the list of students along with their subjects and scores.
4. Get the names and scores of students who have scored more than 80 in
any subject.
1. Retrieve all students and their scores, including students with no scores.
2. Get the list of students and their subjects and scores, including students
without scores.
3. Retrieve student names and scores for the 'Math' subject, including
students without scores.
4. Get the names and scores of all students who have scored more than 80 in
any subject, including students without scores.
5. Retrieve the student names, subjects, and scores, ordered by student
names, including students without scores.
1. Retrieve all scores and their corresponding students, including scores with
no students.
2. Get the list of subjects and their scores along with student names, including
scores without students.
3. Retrieve subjects and scores for the 'Math' subject along with student
names, including scores without students.
4. Get the list of subjects and scores where scores are more than 80, including
scores without students.
3. Retrieve students who are younger than another student with the same
major.
5. Retrieve students who have the same age but different majors.
5. Get the difference between the current score and the previous score.