5 Replies Latest reply: Mar 22, 2012 9:05 AM by Dai-Phuc Ha RSS

    comparing value and taking minimum

      hi everybody,

       

      I have following issue to solve... I just want the rows with minimum time.

      I have data looks like the following table:


      Table1:

      OrderIdTime
      AA00:15
      BB01:10
      BB01:05
      BB01:00
      CC00:32
      CC00:30
      DD00:23
      EE00:45
      EE00:08

       

      I need:


      Table2:

      OrderIdTime
      AA00:15
      BB01:00
      CC00:30
      DD00:23
      EE00:08

       

      I have starting write a script like this:

       

      LOAD

      OrderId,

      Time,

      if(peek('OrderId')=OrderId, if(peek('Time)<Time, peek(Time),Time),Time) as Testing

      FROM Table1;

       

      My result is like Table1 nothin is change.

       

      Thx in advance!!!