Computer Science, asked by netrasuresh1998, 1 month ago

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. Use extract() function )

Answers

Answered by amitkumar007ak19
6

select rental_id, car_id, customer_id , km_driven from rentals

where return_date between '2019-08-01' and '2019-08-31'

order by rental_id;

Explanation:

Answered by anusha195sl
0

Answer:

The correct answer is SQL.

Explanation:

Given:

Display rental id, car id, customer id and km driven of rentals taken during 'AUGUST 2019'.

SELECT rental_id, car_id, customer_id , km_driven from rentals

WHERE return_date between '2019-08-01' and '2019-08-31'

ORDER BY rental_id;

Here, SELECT is the statement that is used to fetch the data from the database.

WHERE is the statement used to fill the records.

ORDER BY is the statement used to differentiate from ascending or descending order.

The above syntax displays about the driven rentals of August 2019.

#SPJ3

Similar questions