Practice Interview Questions
| Question | Status |
|---|---|
As the holiday season nears, your team is gearing up for heightened sales during Christmas. To effectively prepare, you've been assigned the task of identifying the 2 top-performing restaurants based on sales by their IDs.
Make sure to exclude any orders with blank values in the actual_delivery_time field, as they mean that they were not received and for this reason should not be considered as part of the monthly sales calculation.
order_value table:
| Column Name | Description |
|---|---|
| delivery_id | Identifier for the delivery |
| sales_amount | Total amount for the delivery |
delivery_orders table:
| Column Name | Description |
|---|
| delivery_id | Identifier for the delivery |
| order_placed_time | Time when the order was placed |
| predicted_delivery_time | Estimated delivery time for the order |
| actual_delivery_time | Actual delivery time for the order |
| delivery_rating | Rating given to the delivery |
| driver_id | Identifier for the delivery driver |
| restaurant_name | Name of the restaurant |
| consumer_id | Identifier for the consumer |
| restaurant_name | sales |
|---|---|
| El Pacifico | 14313.2 |
| Taj Restaurant | 12311.2 |
As the holiday season nears, your team is gearing up for heightened sales during Christmas. To effectively prepare, you've been assigned the task of identifying the 2 top-performing restaurants based on sales by their IDs.
Make sure to exclude any orders with blank values in the actual_delivery_time field, as they mean that they were not received and for this reason should not be considered as part of the monthly sales calculation.
order_value table:
| Column Name | Description |
|---|---|
| delivery_id | Identifier for the delivery |
| sales_amount | Total amount for the delivery |
delivery_orders table:
| Column Name | Description |
|---|---|
| delivery_id | Identifier for the delivery |
| order_placed_time | Time when the order was placed |
| predicted_delivery_time | Estimated delivery time for the order |
| actual_delivery_time | Actual delivery time for the order |
| delivery_rating | Rating given to the delivery |
| driver_id | Identifier for the delivery driver |
| restaurant_name | Name of the restaurant |
| consumer_id | Identifier for the consumer |
| restaurant_name | sales |
|---|---|
| El Pacifico | 14313.2 |
| Taj Restaurant | 12311.2 |