title: Oracle search in multiple columns grouped by another column
body: <p>I have table in this structure:</p>
  
  <pre><code>id | item | type | string_value | number_value | date_value 
  -----------------------------------------------------------
  1  | 11   | S    | abcd         | null         | null
  2  | 11   | N    | null         | 134.56       | null
  3  | 11   | D    | null         | null         | 2017/01/01
  4  | 12   | N    | null         | 134.56       | null
  5  | 13   | S    | efgh         | null         | null
  6  | 13   | N    | null         | 99           | null
  7  | 13   | D    | null         | null         | 2000/05/21
  8  | 14   | N    | null         | 5            | null
  9  | 14   | D    | null         | null         | 2017/01/01
  10 | 15   | S    | cd           | null         | null
  11 | 15   | N    | null         | 134.56       | null
  12 | 15   | D    | null         | null         | 1998/11/01
  13 | 11   | S    | aaacddff     | null         | null
  14 | 11   | S    | xxxx         | null         | null
  </code></pre>
  
  <p>I want to search <code>item</code> by different combinations of value columns(<code>number_value</code> or <code>string_value/number_value</code> or <code>string_value/date_value</code>)</p>
  
  <p>For example: select distinct <code>item</code> where <code>string_value</code> like '%cd%' <strong>and</strong> <code>number_value</code> = 134.56. Expected result is 11 and 15 (12 apply to <code>number_value</code> but dont have <code>string_value</code>)</p>
  
  <p>There are more value columns I omit for simplicity. Table contains ±100 million rows with joined <code>item</code> table (±2 million rows). Primary key is <code>id</code> and for one <code>item</code> there can be multiple values for same <code>type</code>. If <code>item</code> has multiple values for same <code>type</code> it doesn't matter if every row fits condition but at least one must(like <code>item</code> 11 has <code>string_value</code> in [abcd, aaacddff, xxxx] - first two fits above like condition). This also involves paging.</p>
  
  <p>Query speed is crucial here. <strong>Oracle10g</strong> DB.</p>