INFOTECH Coding Question – Solved

3 Live
You are helping your professor at the university to generate a report containing three columns: name, grade, and mark. You are given a table of grades and students. Your professor has instructed you to create the report according to the following specifications: - He doesn't want the names of those students who received a grade lower than 'C'. - Higher grades in the report should be entered first. - If there is more than one student with the same grade (C - A) assigned to them, order those particular students by their name alphabetically. - Finally, if the grade is lower than 'C', use "NULL" as their name and list them by their grades in descending order. If there is more than one student with the same grade (F - D) assigned to them, order those particular students by their marks in ascending order. The grades table contains the following columns: - grade: letter from A to F - min_mark: the minimum mark a student must achieve in order to reach this particular letter grade - max_mark: the maximum mark a student can achieve in order to get this particular grade

Asked in: INFOTECH

Image of the Question

Question Image

All Testcases Passed βœ”



Passcode Image

Solution


Please login to view the solution


Related Questions

| Given an n x m grid, where rows are numbered from 7 to n and columns from 1 to … |
| There are 'N' coders standing in a line, where i denotes the ith position of a … |
| A birthday party was attended by N number of kids, and each kid was given a uni… |
| Given a matrix of size m * n, where m denotes the number of rows (starting with… |
| A traveler is traveling from the city of Zeta to Omega. He starts with X amount… |
| As an operations engineer at Amazon, you are responsible for organizing the dis… |