Data Interview Qs - Reaching out to past candidates

InterviewQs

Reaching out to past candidates

SQL Database Querying Window Function Subquery

Forward this email to a friend or colleague and challenge them to solve it.

Hi, 

Suppose your team is looking to fill a new role, and wants to reach out to past candidates who had a successful interview but previously declined an offer at your company.

You're given the below tables, detailing candidate offer statuses ('Accepted', 'Declined', 'Rejected') as well as associated interview scores. Using these tables, write a SQL query to return the top 2 candidates with the highest interview scores who 'declined' an offer.


Table: candidateStatus

candidate_name candidate_status
john_smith Accepted
sarah_daniels Declined
tim_cook Accepted
lisa_perelli Rejected
jenny_west Rejected
karl_tran Declined
tammy_turner Declined

Table: candidateInterviews

Each row represents a unique interview/candidate as well as the candidate's score (an integer from 1-5, with 5 representing the highest possible score).

candidate_name interview_score
john_smith 4
sarah_daniels 5
tim_cook 4
lisa_perelli 2
jenny_west 2
karl_tran 4
tammy_turner 3

For simplicity, these tables are small, but you can assume in practicality the tables would be way too large to export or visually search through.


 

You’ve accumulated 261 questions since joining our email list. Create a premium account to access detailed solutions to each problem (including this one) + our new Case studies.


Was this email forwarded to you? You can join our list here to receive questions

How did you like today's question?

15411 Boischatel, Montreal, QC, H9H1Y7, Canada
Don't want to get these emails anymore? We'll forgive you if you unsubscribe

Older messages

Tallying triangles

Monday, February 28, 2022

Python, Arrays, Data Structures, Algorithms, InterviewQs Tallying triangles Python Arrays Data Structures Algorithms Forward this email to a friend or colleague and challenge them to solve it. Hi,

Coins from a row - a game

Friday, February 25, 2022

Python, Arrays, Data Structures, Algorithms, InterviewQs Coins from a row - a game Python Arrays Data Structures Algorithms Forward this email to a friend or colleague and challenge them to solve it.

Spider crawling on a tetrahedron

Wednesday, February 23, 2022

Statistics, Probability, Arrays, InterviewQs Spider crawling on a tetrahedron Statistics Probability Arrays Forward this email to a friend or colleague and challenge them to solve it. Hi, Suppose a

Call conversions

Monday, February 21, 2022

SQL, Database Querying, InterviewQs Call conversions SQL Database Querying Forward this email to a friend or colleague and challenge them to solve it. Hi, You are given the following tables, containing

Simulating random portfolios to illustrate the 'efficient frontier' of returns

Friday, February 18, 2022

Python, Pandas, Data Analysis, External Dataset, Simulation, Data Visualization, Efficient Frontier, InterviewQs Simulating random portfolios to illustrate the 'efficient frontier' of returns

You Might Also Like

Software Testing Weekly - Issue 220

Saturday, May 18, 2024

Software Testing Conferences 📚 View on the Web Archives ISSUE 220 May 18th 2024 COMMENT Welcome to the 220th issue! Have you ever been to a testing conference? They're a great way to learn about

📶 Is a Cellular iPad Worth It? — How to Prevent YouTube From Taking Over Your Screensaver

Saturday, May 18, 2024

Also: This Robot Vacuum Can Clean Stairs, and More! How-To Geek Logo May 18, 2024 📩 Get expert reviews, the hottest deals, how-to's, breaking news, and more delivered directly to your inbox by

Weekend Reading — Objection-oriented programming

Saturday, May 18, 2024

This week we find a power-up box, replace GitHub Actions with Maven XMLs, avoid the worst website in the world, revisit RTO policies, “listen” to OpenAI employees, watch our Slack private messages, do

Daily Coding Problem: Problem #1445 [Easy]

Saturday, May 18, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Jane Street. The United States uses the imperial system of weights and measures, which

You don’t have to take our word for it…

Saturday, May 18, 2024

You can probably tell how excited we are to re-launch our Gigantic courses – which bring on-demand product management training for today's modern Product Managers and Product Leaders. In fact, we

🐍 New Python tutorials on Real Python

Saturday, May 18, 2024

Hey there, There's always something going on over at realpython.com as far as Python tutorials go. Here's what you may have missed this past week: What Is the __pycache__ Folder in Python? In

Visualized | Life Expectancy by Region (1950-2050F) 📊

Saturday, May 18, 2024

This map shows life expectancy at birth for key global regions, from 1950 to 2050F. View Online | Subscribe Presented by Voronoi: The App Where Data Tells the Story FEATURED STORY Life Expectancy by

New Wi-Fi Vulnerability Enables Network Eavesdropping via Downgrade Attacks

Saturday, May 18, 2024

THN Daily Updates Newsletter cover The DevSecOps Playbook: Deliver Continuous Security at Speed ($19.00 Value) FREE for a Limited Time A must-read guide to a new and rapidly growing field in

🐍 New Python tutorials on Real Python

Saturday, May 18, 2024

Hey there, There's always something going on over at realpython.com as far as Python tutorials go. Here's what you may have missed this past week: What Is the __pycache__ Folder in Python? In

Toward 'local' AI w/ Apple's new chip

Saturday, May 18, 2024

faster than the cloud ☁️ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌