title: Filtering out the data grouping by id and some condition
body: <p>I have a requirement where I am getting data with Sql like below</p>
  <pre><code>someid  | passengertype  | somename |
  --------+----------------+-----------
  123     | 3              | abc      |
  123     | 6              | zxc      |
  111     | 4              | qwe      |
  111     | 6              | poi      |
  222     | 2              | lkj      |
  563     | 1              | uyt      |
  563     | 2              | mnb      |
  563     | 6              | oiu      |
  </code></pre>
  <p>I want to select only records grouping by someid where passengertype not either 3 and 6. ie whenever for someid if passengertype contains only 3 or 6 then don't select that id, if 3 or 6 exists with other passengerid's then select. The required output should be:</p>
  <pre><code>someid  | passengertype  | somename |
  --------+----------------+-----------
  111     | 4              | qwe      |
  111     | 6              | poi      |
  222     | 2              | lkj      |
  563     | 1              | uyt      |
  563     | 2              | mnb      |
  563     | 6              | oiu      |
  </code></pre>