title: I want an Oracle query for getting time ranges
body: <p>My FIRST table <code>TIMINGS</code> is like</p>
  
  <pre><code>EMPCODE,Att_DATE,IN_TIME,OUT_TIME
  </code></pre>
  
  <p>My <code>MAIN</code> table is</p>
  
  <pre><code>EMPCODE,DESIGANTION,LACATION ETC.
  </code></pre>
  
  <p>The data in my <code>TIMINGS</code> table is like the following:</p>
  
  <pre>10101  7/2/2010   7/2/2011 7:08:31 AM     7/2/2011 12:05:31 PM
  10101  7/2/2010   7/2/2011 12:58:07 PM    7/2/2011 1:47:36 PM
  10101  7/2/2010   7/2/2011 2:17:52 PM     7/2/2011 4:37:23 PM</pre>
  
  <pre>10102  7/2/2010   7/2/2011 9:44:07 AM     7/2/2011 10:17:53 AM
  10102  7/2/2010   7/2/2011 10:25:21 AM    7/2/2011 11:18:28 AM
  10102  7/2/2010   7/2/2011 11:28:32 AM    7/2/2011 12:10:31 PM
  10102  7/2/2010   7/2/2011 12:35:15 PM     7/2/2011 04:10:04 PM</pre>
  
  <pre>10103  7/2/2010   7/2/2011 8:56:52 AM     7/2/2011 10:03:39 AM
  10103  7/2/2010   7/2/2011 10:10:02 AM    7/2/2011 12:00:07 PM
  10103  7/2/2010   7/2/2011 12:22:54 PM    7/2/2011 4:11:03 PM
  10103  7/2/2011   7/2/2011 4:51:45 PM     7/2/2011 5:10:45 PM</pre>
  
  <pre>10104  7/2/2010   7/2/2011 5:12:37 PM     7/2/2011 6:08:23 PM
  10104  7/2/2010   7/2/2011 6:20:47 PM     7/3/2011 5:04:33 AM</pre>
  
  <p>then i want to display output as </p>
  
  <p>NO one present in ofc in the following timing pairs</p>
  
  <pre>from-time    to-time
  00:00:00     7:08 AM
  12:10:31PM   12:22:54PM
  4:37:23PM    4:51:45PM</pre>