Rental details based on date
Write a query to display rental id, car id, customer id and km driven of rentals taken during 'AUGUST 2019'. Sort the result based on rental id.
(HINT : Use Rentals table to retrieve records. Eg: return date: 2019-08-12 )
NOTE: Maintain the same sequence of column order, as specified in the question description
SOLUTION:
select rental_id,car_id,customer_id,km_driven from rentals where monthName(return_date)='August' && year(return_date)=2019;