mirror of
https://github.com/robindhole/fundamentals.git
synced 2025-03-16 12:49:49 +00:00
1.5 KiB
1.5 KiB
Queries
Sub-queries
- Get all the students whose IQ is greater than the average IQ.
- Get all the students whose IQ is greater than the highest IQ of the batch_id
2
students.
- Get all the students whose IQ is greater than
all
the IQs of the batch_id2
students.
- Find all the students who are in batches that start with the word
Jedi
(Without JOIN)
- Find all the students whose IQ is greater than the average IQ of their batch.
- Get all the instructors that have at least one batch (Without using joins)
- Print all the names, batch ID and average IQ of the batch for each student
Built-in Functions
- Get the average IQ of all the students rounded to the nearest integer.
- Find all batches whose name is longer than 10 characters.
- Find all batches whose name's first 10 characters contains the string
sher
- Get all batches that have started on a Sunday
- Get all batches that have been running for more than 10 years
- Print the name and the instructor's id for each batch. If no instructor is assigned, print
NO INSTRUCTOR
.
- Print the name and IQ of each student. If the IQ of the student is less than 100, print
LOW IQ
instead.
- For each student print the name and their IQ category.
IQ | Category |
---|---|
< 100 | LOW IQ |
100 - 150 | MEDIUM |
> 150 | HIGH |