Prompt
- It is important for a store to have consistent business hours across all food delivery platforms to avoid operational inconsistencies.
- If a store's business hours on one platform do not match the hours listed on another platform, it can create potential problems.
- Ensuring that a store's business hours are the same across all food delivery platforms is a key operational metric.
Example of business hours in Doordash
Goal
The goal of this interview is to come up with a query to understand differences in the business hours for a store across all platforms. You will compute a metric called business hour mismatch between a store on Grubhub and a store on UberEats
For this problem statement, we will only focus on Grubhub and UberEats.
- Write a SQL query/set of queries that
- Computes Business Hours Mismatch between a restaurant on two platforms. For the sake of simplicity, we will assume UberEats as the ground truth. We will then try to find the issues in Grubhub store hours.
- Identify if Grubhub Hours are within the range of UberEats hours (column:is_out_of_range: “In Range”, “Out of Range with 5 mins difference”, “Out of Range”)
- Computing Business Hour Mismatch
Data
Note all the data is sample data available in BigQuery. (To view the data, open your personal BigQuery console and run these queries).