🎁 Exclusive Offer! Join our Telegram Channel to get **special discounts** and updates! 🚀

🚀 Struggling with coding interviews? We've got you covered! 💡 Practice real questions, sharpen your skills, and land your dream job! 🎯
Question 92 - 100% Working Solution | Buy Now

Description

12 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