Cognizant Handson - Rental details based on date

 

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;

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.