mirror of
https://github.com/robindhole/fundamentals.git
synced 2025-09-13 22:12:12 +00:00
Adds notes.
This commit is contained in:
46
database/notes/08-window-functions-worksheet.md
Normal file
46
database/notes/08-window-functions-worksheet.md
Normal file
@@ -0,0 +1,46 @@
|
||||
# Window functions worksheet
|
||||
|
||||
1. Print the student names along with the number of students in their batch.
|
||||
|
||||
```sql
|
||||
```
|
||||
|
||||
2. Print the student names along with the average IQ of their batch.
|
||||
|
||||
```sql
|
||||
```
|
||||
|
||||
3. Print the student names along with the maximum IQ of their batch.
|
||||
|
||||
```sql
|
||||
```
|
||||
|
||||
4. Print the student names along with their rank based on IQ.
|
||||
|
||||
```sql
|
||||
```
|
||||
|
||||
5. Print the student names along with their rank in their batch based on IQ.
|
||||
|
||||
```sql
|
||||
```
|
||||
|
||||
6. Print the student names along with their rank in their batch based on IQ. Ties should not increase the rank.
|
||||
|
||||
```sql
|
||||
```
|
||||
|
||||
7. Print the student names along with their rank in their batch based on IQ. Ties should not be counted and broken by ID.
|
||||
|
||||
```sql
|
||||
```
|
||||
|
||||
8. Find the rank of batches based on the start date of the batch.
|
||||
|
||||
```sql
|
||||
```
|
||||
|
||||
9. Sort the instructors by the first and last name and assign them a roll number.
|
||||
|
||||
```sql
|
||||
```
|
Reference in New Issue
Block a user