Django RAW Query

The idea behind that example was to replicate what your raw query is doing. Whether or not that satisfies your intent or requirements is not something I can determine.
Nor am I 100% sure that it will do exactly that - you need to test it and validate it for all your use cases.
I did point out in my earlier response that I didn’t think that what you’re doing satisfies the general case, and supplied you with links to two blog posts explaining an aspect of it you may wish to consider.

I was asking because, I am unable to find the another table which is bookingDetails where it will check the dates, that’s why I was asking