fundamentals/database/notes/08-window-functions-worksheet.md
2022-10-08 16:21:02 +01:00

46 lines
881 B
Markdown

# 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
```