title: Sql query to find date period between multiple rows
body: <p>I have a table with three columns (City_Code | Start_Date | End_Date). <br>
  Suppose i have the following data: <br></p>
  
  <pre><code>New_York|01/01/1985|01/01/1987
  Paris|02/01/1987|01/01/1990 
  San Francisco|02/01/1990|04/01/1990
  Paris|05/01/1990|08/01/1990 
  New_York|09/01/1990|11/01/1990 
  New_York|12/01/1990|19/01/1990 
  New_York|20/01/1990|28/01/1990 
  </code></pre>
  
  <p>I would like to get the date period for which someone lived in the last city of his residence. In this example that is New_York(09/01/1990-28/01/1990) using only sql. I can get this period by manipulating the data with java , but is it possible to do it with plain sql?</p>
  
  <p>Thanks in advance</p>