21.17. Write Code Questions¶
-
Given a database of bike share information fix the SELECT statement to retrieve the
bike_numberanddurationfrom tabletrip_dataforbike_number“W00837”. -
Given a database of bike share information write a SELECT statement below that retrieves the
bike_numberanddurationfrom tabletrip_datafor all of the rentals that had adurationof more than 85,000. -
Given a database of bike share information write a SELECT statement below that retrieves the
bike_number,duration, andstart_datefrom tabletrip_datafor all of the rentals fromstart_station31105 and limit the results to 5. -
Given a database of bike share information write a SELECT statement below that retrieves the
bike_numberandmember_typefor all of the rentals from tabletrip_datawhereend_station31200 and limit the results to 5. -
Given a database of bike share information write a SELECT statement below that retrieves the
bike_numberanddurationfrom tabletrip_datafor all of the rentals that had adurationof more than 85,000 and order them bydurationdescending. -
Given a database of bike share information write a SELECT statement to retrieve all the rows from tables
trip_dataandbikeshare_stationswhere thestart_stationintrip_datais the same as thestation_idinbikeshare_stations. Limit the results to 5 rows. -
Given a database of bike share information write a SELECT statement to retrieve the
durationandbike_numberfromtrip_dataand thenamefrombikeshare_stationswhere thestart_stationintrip_datais the same as thestation_idinbikeshare_stations. Limit the results to 5 rows. -
Given a database of bike share information write a SELECT statement to retrieve the
durationandbike_numberfromtrip_dataand thename,latitude, andlongitudefrombikeshare_stationswhere thestart_stationintrip_datais the same as thestation_idinbikeshare_stations. Limit the results to 5 rows. -
Given a database of bike share information write a SELECT statement to retrieve the
bike_number,start_date, andend_datefromtrip_dataand thestation_idandnamefrombikeshare_stationswhere thestart_stationintrip_datais the same as thestation_idinbikeshare_stationsand where thestation_idequals 31101. Limit the results to 5 rows. -
Given a database of bike share information write a SELECT statement to retrieve the
bike_number,start_date, andend_datefromtrip_dataand thestation_idandnamefrombikeshare_stationswhere thestart_stationintrip_datais the same as thestation_idinbikeshare_stationsand where themember_typeequals “Casual”. Limit the results to 5 rows.