title: combine min() and having()
body: <p>Is there any possibility to use something linke <code>having()</code> within a <code>min()</code> aggregate inline?</p>
  
  <pre><code>select distinct
    "timestamp"
    , MinActiveValue = min( "value" ) over ( partition by "timestamp" ) having ( "active" = 1 )
  from
    "data"
  </code></pre>
  
  <p>In the linked example below, things work well using the first query.
  Indeed, i don't want to have to use the where clause for min-condition, since i would destroy data-filtering used in the same query. ( there are some grouped sums calculated by the same query for example )</p>
  
  <p><a href="http://sqlfiddle.com/#!3/53c12/8/0" rel="nofollow">SQL Fiddle Link</a></p>