О чём разговор
High-frequency customer share by month, top customers with ties, restaurant sales trend
Этапы
- 1Лайв-кодинг
Все вопросы
- 01:34
What percent of customers in each month are high frequency customers, meaning more than 30 deliveries per calendar month?
Код - 10:28
But we want the percent of all customers each month that are high frequency customers.
Код - 14:14
Excluding high frequency customers, which customers had the highest number of deliveries each month, and if more than one customer ties, show all of them?
Код - 21:43
Can you use the order value table, which brings in the order total, together with the delivery orders table?
Код - 22:25
Can you show how much sales for restaurant ID 8 change versus the previous month in 2021?
Код - 32:59
So we can ignore January, since it has no previous month, right?
Код
Ключевые моменты
- 01:34
First task: share of high-frequency customers by month
- 10:28
Clarification: percent of all customers in the month
- 14:14
Second task: top customers, with ties
- 22:25
Third task: monthly sales change for restaurant ID 8
- 27:36
Time nearly up, interviewer stays for five more minutes
Отрывок из разговора
just fii we are looking for percentage okay percent of our customers So what you have so far is the number of customers that have high frequency customers, right?
Yeah.
But we want the percent of all customers each month that are high frequency customers.
Okay. We want the percent. Okay. All right.
Что вынести
A live-coding SQL round for a Senior Data Scientist, first round, 34 minutes. No queries were run; the candidate wrote the solutions aloud in an online editor. The three linked tasks covered the share of high-frequency customers per month (more than 30 deliveries), the top customers per month with ties included, and the month-over-month change in one restaurant's sales in 2021 using a window function. The interviewer clarified the percentage denominator in the first task, and the candidate finished all three with some guidance before the call ended on time; a recruiter will follow up.
Разбор собран по записи разговора.
Расшифровка
So if that makes sense to you, we can get started. What do you think?
Yeah, I'm ready. Let's start.
Okay, awesome. Do you have access to the hacker rank link in your invite?
Let me check. Yeah, I do have an access.
Okay, so you've got to log in there.
Okay, I'm writing access. Set to email. Okay, I feel like I'm joined.
Okay, do you see like a data schema and a question below it?
below it yeah I see uh delivery orders yeah yeah perfect so for this exercise like for all the
questions for that matter we are not going to run any of it we are just going to work through it and you're going to write it as though we are going to run it um whether you want to talk through while working to describe what you're doing or you want to first get it done and just explain what you've done totally up to you I don't care either way but essentially that's the idea so you can read get started and then let me know if you have any questions I can help them all right I have a table
delivery orders there are like few columns delivery ID ID of delivery order place time timestamp time order was placed delivery rating so it's in pressure delivery rating scale from zero to five Dasher ID okay integer ID of Dasher delivery restaurant ID customer ID okay so question one a high frequency customer is defined it is defined as a customer that orders greater than 30 deliveries per calendar months okay so what is the percent of customers was ordered in a given month I considered high frequency okay group by months assume there are no customer IDs with zero orders in a given month in the table okay okay you hear me yeah okay all right so I can so you I can explain you my plan and I can run the query, right?
Yeah, yeah. You can even walk through the query first and explain what you've done. Like, that's fine too. I'm gonna read and look at what you're doing anyway. So if you wanna just get started, that's fine too.
All right, so, I mean, should I explain you also like, I think it would be, it would make sense to explain.
Whatever you prefer, so yeah.
Yeah, so the plan will be, let's extract, Months. Then probably, let me think. So then I will group by months and customer ID. I also need to count deliveries per customer per month count deliveries uh else oh we also need to uh obviously filter because we have this uh than 30 deliveries per calendar months greater okay so it's gonna be filter more than 30 deliveries and and and and I would group group by months and I need to group by months and I think by count customers Okay, that's, this is how I see it for now.
I mean, I might change it a little bit when I will write the code, but that's basically how I will implement it.
Дальше — после входа. Это бесплатно и займёт минуту.
Войти и читатьПохожие собеседования
DoorDash
Product Analyst/DS
Dasher ranking metrics, a motivation program, geo A/B test design and a null result
What data or metrics would you use to identify our best Dashers?
DoorDash
Product Analyst/DS
Medical-device ML model, restaurant ranking, acquisition channels, A/B tests, retention
What was your role as a data scientist on the medical device project, what experiments were you running to prove value, and how did you define where the business needs to go?
DoorDash
Product Analyst/DS
Los Angeles delivery drop, funnel and proxy metrics, promo A/B test, interference risk
I'd love to hear a quick introduction of yourself.
DoorDash
Product Analyst/DS
Ambiguous problems, ROI priorities, stakeholder alignment, A/B tests and team trust
Could you give a quick intro about your background and your interest?