title: Query using the results from another query
body: <p>I'm trying to write a query that will produce set of results based on the results from another query.  All the required data for the queries are from one table, just a different set of query criteria.  I'm not sure if what I'm asking is even possible to create in a single query.    </p>
  
  <pre><code>select OBJID, case_type, activity, TITLE, x_rev_esc_prim_reason, x_rev_esc_sec_reason, x_esc_third_reason, x_create_dt, x_update_dt, x_sales_rep 
      from table_case
  </code></pre>
  
  <p>The results from the above query basically captures everything I need from the table, but I need to reduce the number or filter the results returned.  </p>
  
  <p>The results from the below query is what i need, to further reduce the results from the above query.  In addition, the query will also need the x_create_dt from the below query results to be greater than the x_create_dt from the results from the above query results.</p>
  
  <pre><code>select OBJID, case_type, activity, TITLE, x_rev_esc_prim_reason, x_rev_esc_sec_reason, x_esc_third_reason, x_create_dt, x_update_dt, x_sales_rep 
      from table_case
      where case_type = 'Sales'
      and activity = 'DO'  
  </code></pre>
  
  <p><a href="http://i.stack.imgur.com/QsWOd.jpg" rel="nofollow">IMAGE OF THE SAMPLE DATA AND RESULTS</a></p>
  
  <p>DB is currently Oracle10g</p>