Last updated
Identify students who cleared all subjects, calculate their percentage, and list failed subjects for students who did not qualify.
Identify students who cleared all subjects, calculate their percentage, and list failed subjects for students who did not qualify.
Your dataset contains three student screening tables: 1. A Students table with roll numbers and student names 2. A Scores table with marks across six subjects 3. A Subjects table with subject names and pass marks Only students who pass all six subjects will be considered for the interview round. The company also wants to know the subjects failed by students who did not qualify. There is an option between Subject5 and Subject6. If a student has taken both, the higher score between Subject5 and Subject6 should be considered while calculating total percentage.
| Column | Type | Key / Notes |
|---|---|---|
| Roll_No | VARCHAR(20) | |
| Name | VARCHAR(100) |
| Column | Type | Key / Notes |
|---|---|---|
| Student_ID | VARCHAR(20) | |
| Subject1 | INT | |
| Subject2 | INT | |
| Subject3 | INT | |
| Subject4 | INT | |
| Subject5 | INT | |
| Subject6 | INT |
| Column | Type | Key / Notes |
|---|---|---|
| ID | VARCHAR(10) | |
| Subject | VARCHAR(100) | |
| Pass_Marks | INT |
Subjects — 6 rows
| ID | Subject | Pass_Marks |
|---|---|---|
| S1 | Excel | 50 |
| S2 | SQL | 50 |
| S3 | Python | 40 |
| S4 | Hadoop | 35 |
| S5 | Power BI | 40 |
| S6 | Tableau | 40 |
Students — 6 rows
| Roll_No | Name |
|---|---|
| 2GR5CS011 | Aarav Sharma |
| 2GR5CS012 | Priya Gupta |
| 2GR5CS013 | Rohit Singh |
| 2GR5CS014 | Anjali Patel |
| 2GR5CS015 | Karan Mehta |
| 2GR5CS016 | Nisha Reddy |
Scores — 6 rows
| Student_ID | Subject1 | Subject2 | Subject3 | Subject4 | Subject5 | Subject6 |
|---|---|---|---|---|---|---|
| 2GR5CS011 | 75 | 30 | 57 | 44 | 35 | 6 |
| 2GR5CS012 | 70 | 21 | 44 | 63 | 99 | 85 |
| 2GR5CS013 | 21 | 9 | 66 | 87 | 91 | 78 |
| 2GR5CS014 | 84 | 46 | 20 | 34 | 100 | 38 |
| 2GR5CS015 | 31 | 90 | 63 | 60 | 90 | 80 |
| 2GR5CS016 | 95 | 51 | 9 | 26 | 26 | 21 |
Student Screening Analysis: Which students passed the screening test, what percentage did they score, and which subjects did failed students fail in? The final result table should have Roll_No, Name, Percentage_marks, Failed_subjects, and Status columns.
Your output should look like this (partial example):
| Roll_No | Name | Percentage_marks | Failed_subjects | Status |
|---|---|---|---|---|
| 2GR5CSxxx | Student Name | 00.00 | NULL | Passed |
| 2GR5CSxxx | Student Name | 00.00 | SQL, Python | Failed |