title: Oracle SQL to get min number from case statement
body: <p>I have this query below (in Oracle PL/SQL) which I am trying to pull a price, it seems to give me 3 records but I only want one.  I want to show the lowest rate if I run into this kind of scenario, can I possibly put a min function around the 'rate' field which is in the case statement below?</p>
  
  <pre><code>  select /*+ rule */ a.skucode as skucode,a.sizecode as 
          sizecode,b.colourdescription as colourdesc, a.season as season, 
          (case when sp.eventnbr in (select eventnbr from event where sysdate       
          between eventbegints 
          and eventendts) then rate else sellprice end) as listprice 
                    from sku a, colour b, skuprcevnt sp 
                    where a.skucode = '00000000051361264-04'
                   --" and a.storecode = '00000' " +
                    and a.storecode = '00000'
                    and a.colourcode = b.colourcode 
                    and a.skucode=sp.skucode(+) 
                    order by a.skucode, a.sizecode, b.colourdescription;
  </code></pre>
  
  <p>This gives the following result (but I want to see the price of 76.99 only):</p>
  
  <pre><code>SKUCODE             SIZECODE   COLOURDESC   SEASON  LISTPRICE
  00000000051361264-04    XL     BLACK        FA-13       155
  00000000051361264-04    XL     BLACK        FA-13       155
  00000000051361264-04    XL     BLACK        FA-13       76.99
  </code></pre>