mirror of
https://github.com/robindhole/fundamentals.git
synced 2025-03-15 20:20:08 +00:00
1.3 KiB
1.3 KiB
Queries
Joins
- Get all batch names along with their instructor names.
- Get all students along with their batch names if present else
NULL
.
- Get all students along with their batch names. Also, fetch all the batches which have no students.
- Get all the combinations of batches and instructors.
- Get all students with their instructors. If a student has no instructor, then show
NULL
for the instructor's name.
Aggregation
- Get the maximum IQ in all students (Try without aggregation first).
- Get the maximum IQ in all students (With aggregation).
- Get the oldest batch from the batches table.
- Fetch the number of batches that start with the word
Jedi
.
- Get the average IQ of all students (Without using
AVG
)
- Get the average IQ of students in all batches.
- Find the average IQ of students in each batch.
- Find the total number of students in each batch.
- Get the total number of batches taught by each instructor.
- Find the average IQ of students in batches with batch ID
1
and2
.
- Find count of students that are part of batches that have average IQ greater than
120
.