INFOTECH Coding Question – Solved

6 Live
You own a recruiting agency and you are trying to analyze data from the recruiting process. After doing a data pull, you have a database containing 2 tables - interviews and positions. The interviews table contains the following columns: - id: a unique ID for each interview session - position_id: ID for the position that the interview was for - candidate_id: ID for the candidate that was interviewed - score: overall interview rating (1 to 5) The positions table contains the following columns: - id: a unique ID for each position - company: the name of the company that is recruiting for the position If the score for the interview is greater than or equal to 4, the candidate is considered to have successfully passed the interview. Your task is to implement a query to calculate the sum of all interviews with successful scores (score >= 4) and the count of successful interviews, for each company. If a company did not have any successful interviews for any positions, return 0. The final output should be ordered by company name in increasing order.

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