2
answers
1
watching
324
views
28 Nov 2021
Q5. There are two tables with the following details:
Ride_details table:
Ride_id – A unique entry for each ride taken. Created_at – The time on which the ride was created. Pickup_location – An id for the pickup location.
Drop_location – An id for the drop location.
Location table:
Location_id – A unique entry for each location.
Metro_location – 1 implies that the stand is a metro station. 0 implies that the stand is not a metro station.
Write an SQL query to get the date wise number of rides in the following sets -
- Rides starting from the metro and ending at a non-metro location - Column name – metro_start
- Rides starting from a non-metro location and ending at the metro station - Column name –
metro_end
- Rides starting and ending at the metro station - Column name – metro_start_end
Rides starting and ending at a non-metro location - Column name – non_metro_start_end
Q5. There are two tables with the following details:
Ride_details table:
Ride_id – A unique entry for each ride taken. Created_at – The time on which the ride was created. Pickup_location – An id for the pickup location.
Drop_location – An id for the drop location.
Location table:
Location_id – A unique entry for each location.
Metro_location – 1 implies that the stand is a metro station. 0 implies that the stand is not a metro station.
Write an SQL query to get the date wise number of rides in the following sets -
- Rides starting from the metro and ending at a non-metro location - Column name – metro_start
- Rides starting from a non-metro location and ending at the metro station - Column name –
metro_end
- Rides starting and ending at the metro station - Column name – metro_start_end
Rides starting and ending at a non-metro location - Column name – non_metro_start_end
Read by 1 person
26 Dec 2021
Read by 4 people
yelloworangeLv3
28 Nov 2021
Already have an account? Log in