title: How to check that group has a value in Oracle?
body: <p>For example, I have a table tbl like</p>
  
  <pre><code>values
  10
  20
  30
  40
  </code></pre>
  
  <p>on this table by the condition I have GROUP BY like this:</p>
  
  <pre><code>SELECT ???
  FROM tbl 
  GROUP BY values
  </code></pre>
  
  <p>I need to check that group has some value, for example 30</p>
  
  <p><strong>UPD:</strong>
  In real task a have a table with many columns and other operations on them and in one column i need to check whether value in every group of this column.</p>
  
  <p><strong>UPD2:</strong>
  I need something like this: </p>
  
  <pre><code>select 
  min(created_timestamp),
  max(resource_id),
  max(price),
  CASE WHEN event_type has (1704 or 1701 or 1703) THEN return found value END
  CASE WHEN event_type has (1707) THEN return 1707 END
  from subscriptions
  group by guid
  </code></pre>