question

Inthiyazkhan avatar image
Inthiyazkhan asked

The manager asks for the rental ID and customer ID of transactions that have rental date starting May 26, 2005 and return date before May 29, 2005.

I am new into sql and i am trying to solve this question.

sql
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
WRBI avatar image
WRBI answered

Hi @Inthiyazkhan,

In the future it'd be worth showing your table structure. However, the following query should be round about what you need based of your question.

SELECT 	RentalID,
	CustomerID
FROM YourSchema.YourTableName
WHERE RentalDate >= '2005-05-26' AND
	ReturnDate < '2005-05-29'

I'd recommend looking at some tutorials such as Wise Owl Tutorials on YouTube for SQL, W3Schools for SQL etc... there are plenty of resources out there to learn SQL from and they will help you greatly with queries like the above.

Regards,

WRBI.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.