INFOTECH Coding Question – Solved

11 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

| You are given a board of size M Γ— N where each cell can be either empty ('O') o… |
| Undirected Coloured Graph Shortest Path You are given an undirected weight… |
| Village Voyage A computer game "Village Voyage" has N villages (labeled 1 to… |
| Academic Decathlon Students are being selected for an academic decathlon tea… |
| Sum of Arrays Given two arrays each of length n, arr1 and arr2, in one opera… |
| Count Swaps During Custom Sorting Analyze the efficiency of the following so… |