title: SQL : How to get available phone numbers based off of start and end date?
body: <p>I have a business that rents out international phone numbers to customers when traveling. 
  When a customer makes an order I want to display to the customer the available phone numbers for his booking dates based on his <code>start_date</code> and <code>end_date</code>. </p>
  
  <p>Since these phone numbers are rented out, I need to select from the table ONLY those numbers that are not rented out yet for dates that would interfere with the current customers dates. </p>
  
  <p>I also don't want to rent out any phone number prior to 7 days after its end date. Meaning, If a customer booked a phone number for 1-1-2020 through 1-20-2020, I don't want this phone number to be booked by another customer before 1-27-2020. I want the phone number to have a 7 day window of being clear.</p>
  
  <p>I have a table with the phone numbers and a table with the orders that is related to the phone numbers table via <code>phone_number_id</code>.
  The <code>orders</code> table has the current customers <code>start_date</code> and <code>end_date</code> for travel without the phone number id saved yet to it. 
  The <code>orders</code> table also has the <code>start_date</code> and <code>end_date</code> for all other customers dates of travel as well as which <code>phone_number_id</code> was assigned/booked up for their travel dates.</p>
  
  <p>How would the SQL query look like when trying to select the phone numbers that are available for the current customers dates?</p>