Uber Data Analyst Interview Question | Tricky SQL Interview Problem | Cracking SQL Interview

Publicado el: 19 marzo 2024
en el canal de: Vipul Gupta
599
26

Hi Learners! This is a real-world SQL interview problem. It has been asked in the Data Analyst Interview of Uber.

You can practice this problem by your own, below is the DDl and DML commands:

CREATE TABLE `sys`.`trips` (
`id` INT NOT NULL,
`client_id` VARCHAR(45) NULL,
`driver_id` VARCHAR(45) NULL,
`city_id` VARCHAR(45) NULL,
`status` VARCHAR(45) NULL,
`request_at` date NULL,
PRIMARY KEY (`id`));



insert into trips values (1 , '1' , '10' , '1' , 'completed' , '2023-10-01' ),
(2 , '2' , '11' , '1' , 'cancelled_by_driver' , '2023-10-01' ),
(3 , '3' , '12' , '6' , 'completed' , '2023-10-01' ),
(4 , '4' , '13' , '6' , 'cancelled_by_client' , '2023-10-01' ),
(5 , '1' , '10' , '1' , 'completed' , '2023-10-02' ),
(6 , '2' , '11' , '6' , 'completed' , '2023-10-02' ),
(7 , '3' , '12' , '6' , 'completed' , '2023-10-03' ),
(8 , '2' , '12' , '12' , 'completed' , '2023-10-03' ),
(9 , '3' , '10' , '12' , 'completed' , '2023-10-03' ),
(10 , '4' , '13' , '12' , 'cancelled_by_driver' , '2023-10-03' );

CREATE TABLE `sys`.`uber_users` (
`user_id` INT NOT NULL,
`banned` VARCHAR(45) NULL,
`role` VARCHAR(45) NULL,
PRIMARY KEY (`user_id`));


insert into uber_users values
(1, 'No', 'client'),
(2, 'Yes', 'client'),
(3, 'No', 'client'),
(4, 'No', 'client'),
(10, 'No', 'driver'),
(11, 'No', 'driver'),
(12, 'No', 'driver'),
(13, 'No', 'driver');

**************************************************

In this video, we will be discussing the step-by-step approach to the solution.

For a detailed understanding of SQL, refer to my Master SQL series.
   • SQL Master series  

Do subscribe to the channel for more videos and grab your dream job in data analytics.

YouTube: @AnalyticsWithVipul
Instagram:   / learn_with_.  .
Facebook: https://www.facebook.com/profile.php?...
LinkedIn:   / vipul-gup.  .


Got a question about the solution? Please share it in the comment section below.

If you also have an interesting problem that was asked in any of your previous interviews, do share it in the comment box and if I find it interesting, I will make a solution video on that in the future.

Thank You
Vipul Gupta


En esta página del sitio puede ver el video en línea Uber Data Analyst Interview Question | Tricky SQL Interview Problem | Cracking SQL Interview de Duración hora minuto segunda en buena calidad , que subió el usuario Vipul Gupta 19 marzo 2024, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 599 veces y le gustó 26 a los espectadores. Disfruta viendo!