INFOTECH Coding Question – Solved

2 Live
Your boss wants to identify the successful projects running in your company, so he asked you to prepare a list of all the currently active projects and their average monthly income. You have stored the information about these projects in a simple database with a single Projects table that has five columns: - internal_id: the company's internal identifier for the project - project_name: the official name of the project - team_size: the number of employees working on the project - team_lead: the name of the project manager - income: the average monthly income of the project Your boss says that internal project ids are irrelevant to him and that he isn't interested in how big the teams are. Since that's the case, he wants you to create another table by removing the internal_id and team_size columns from the existing Projects table. Return it sorted by internal_id in ascending order. Example: For the following table Projects: | internal_id | project_name | team_size | team_lead | income | |-------------|--------------|-----------|-----------|--------| | 101 | ManRoduce | 15 | John Doe | 50000 | | 102 | WebScribe | 10 | Jane Smith| 30000 | | 103 | DataFlow | 20 | Sam Black | 70000 | You need to return the following table: | project_name | team_lead | income | |--------------|-----------|--------| | ManRoduce | John Doe | 50000 | | WebScribe | Jane Smith| 30000 | | DataFlow | Sam Black | 70000 |

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… |