Prevent duplicate entries and removed days from the month query