Query between two dates

I solved using another approach.