0% found this document useful (0 votes)
10 views1 page

Rapido Rides SQL Queries Guide

The document contains SQL queries for retrieving ride data from the 'rapido' database. It includes commands to select all rides, sort rides by user ID in descending order, and list detailed ride information arranged by user ID and start location. The focus is on analyzing user-specific travel patterns for service improvements.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views1 page

Rapido Rides SQL Queries Guide

The document contains SQL queries for retrieving ride data from the 'rapido' database. It includes commands to select all rides, sort rides by user ID in descending order, and list detailed ride information arranged by user ID and start location. The focus is on analyzing user-specific travel patterns for service improvements.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

#Question: Get all the rides available in Rapido.

select * from [Link];

#If we want to sort in descending order of a particular column, in this case by


user_id and want to see
# ride_id,user_id,start_location

select
ride_id,
user_id,
start_location
from [Link]
order by user_id desc;

#Question: List all ride details including ride ID, user ID, start time, end time, start
location, end location, distance in kilometers, and vehicle type, arranged first by
user ID from highest to lowest and then by start location in a way that groups rides
by user, to analyze user-specific travel patterns for targeted service improvements.
select
ride_id,user_id,start_time,end_time,start_location,end_location,distance_km,vehicle_
type
from `[Link]`
order by user_id desc,start_location;

You might also like