mirror of
https://github.com/robindhole/fundamentals.git
synced 2025-03-17 06:10:03 +00:00
46 lines
881 B
Markdown
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
|
||
|
```
|