Summarize Taxi Drivers and Rides
Updated
Problem statement
Analyze the provided taxi-driver and ride data, compute summary statistics, and save the result.
Interpretation
For this exercise, assume the input contains one drivers table and four ride partitions named rides_1 through rides_4. Return a one-row summary with exactly these columns:
average_rating: the arithmetic mean ofratingacross all drivers.second_language_ratio: the number of drivers whosesecond_languageis not exactly"no", divided by the total number of drivers.successful_ride_ratio: the number of rides whosestatusis exactly"Success", divided by the number of rides across all four partitions.
Return the columns in the listed order; the returned table stands for the saved result file.
Table schema
Use the same input data with any supported language. Open the Schema tab in the editor to see the generated SQL setup or Pandas DataFrames.
drivers
Taxi-driver attributes used for the driver-level summary.
| Column | Type | Nullable | Description |
|---|---|---|---|
| driver_idPK | Integer | No | — |
| age | Integer | No | — |
| second_language | Text | No | — |
| rating | Decimal | No | — |
rides_1
Ride partition 1.
| Column | Type | Nullable | Description |
|---|---|---|---|
| ride_idPK | Integer | No | — |
| driver_id | Integer | No | — |
| status | Text | No | — |
Foreign key: driver_id → drivers(driver_id)
rides_2
Ride partition 2.
| Column | Type | Nullable | Description |
|---|---|---|---|
| ride_idPK | Integer | No | — |
| driver_id | Integer | No | — |
| status | Text | No | — |
Foreign key: driver_id → drivers(driver_id)
rides_3
Ride partition 3.
| Column | Type | Nullable | Description |
|---|---|---|---|
| ride_idPK | Integer | No | — |
| driver_id | Integer | No | — |
| status | Text | No | — |
Foreign key: driver_id → drivers(driver_id)
rides_4
Ride partition 4.
| Column | Type | Nullable | Description |
|---|---|---|---|
| ride_idPK | Integer | No | — |
| driver_id | Integer | No | — |
| status | Text | No | — |
Foreign key: driver_id → drivers(driver_id)
Expected result
Your query or function must return these columns.
| Column | Type | Nullable | Description |
|---|---|---|---|
| average_rating | Decimal | No | — |
| second_language_ratio | Decimal | No | — |
| successful_ride_ratio | Decimal | No | — |
Row order: must match exactly. Numeric tolerance: 1e-9.
Constraints
driverscontains at least one row.- At least one ride exists across
rides_1,rides_2,rides_3, andrides_4. - Every ride references a driver present in
drivers. - Each
ratingis finite. - Ratios are values between
0and1, inclusive.
Source note: The source report requests a CSV file with insight_type and value columns. This practice retains its existing one-row summary result.
More Boston Consulting Group interview questions
- Build Taxi Driver Performance FeaturesOA · Seen Nov 2026
- Competition Winner and Runner-Up (Forward Deployed Engineer)OA · Seen Nov 2026
- Count Belt Sections With K Fruit Pairs (Forward Deployed Engineer)OA · Seen Nov 2026
- Robot Stops Left or Right (Forward Deployed Engineer)OA · Seen Nov 2026
- Split a Matrix Into Four Partitions by Average (Forward Deployed Engineer)OA · Seen Nov 2026
- Predict Taxi Driver ClassesOA · Seen Oct 2026
- Prepare Taxi Driver Classification DataOA · Seen Oct 2026
- Even-Position MonotonicityOA · Seen Jul 2026
- Shortest Distances From an Adjacency MatrixPHONE SCREEN · Seen Sep 2026
Similar questions at other companies
- Is This Date a Weekend?Salesforce · OASalesforce interview questions
- Balance a Chemical EquationMicrosoft · OAMicrosoft interview questions
- Simplify a Quadratic ExpressionOpenAI · OAOpenAI interview questions
- Hedge Inventory with Return CovarianceMillennium · OAMillennium interview questions
- Piecewise Linear Interpolation and ExtrapolationTwo Sigma · OATwo Sigma interview questions
- Evaluate a Python Integer ExpressionOdoo · OAOdoo interview questions
- Customer Order FeesAdobe · OAAdobe interview questions
- Smallest Value for a Linear Expression ModuloIntel · OA
- Transaction Fee Calculator — Parts 1–2: Basic Fee Calculation and Conditional Fee RulesStripe · PHONE SCREENStripe interview questions
- Stack Formula InterpreterTypeSafe AI · PHONE SCREEN