Finding top 5 min and max rows

I have a table with 345,599 rows that contain send_date as a column. I would like to see 5 rows with the highest date.(Like max(send_date)) but return 5 rows instead of one row.
I tried getting min(send_date) and max(send_date) but the data is bogus so I am trying to get the next date in line.

Answered [url http://forums.oracle.com/forums/thread.jsp?forum=61&thread=307110&tstart=0&trange=15]Here

Similar Messages

  • To find out the min and max memory been used by each parameter under SGA_MA

    Hi,
    Can any please tell me how to find out the min and max memory been used by each parameter under SGA_MAX and SGA_TARGET ? below is the db CRMS65T. If any such script is there please provide me
    SQL> select name from v$database;
    NAME
    CRMS65T
    SQL> show parameter sga
    NAME                                 TYPE        VALUE
    lock_sga                             boolean     FALSE
    pre_page_sga                         boolean     FALSE
    sga_max_size                         big integer 1000M
    sga_target                           big integer 1000MThanks in advance

    Can any please tell me how to find out the min and max memory been used by each parameter under SGA_MAX and SGA_TARGET ? below is the db CRMS65T. If any such script is there please provide meI guess your question is, each memory components of SGA? if so
    SQL> select * from v$sgainfo;
    NAME                                  BYTES RES
    Fixed SGA Size                      2088504 No
    Redo Buffers                       18882560 No
    Buffer Cache Size                 616562688 Yes
    Shared Pool Size                  301989888 Yes
    Large Pool Size                     4194304 Yes
    Java Pool Size                      4194304 Yes
    Streams Pool Size                         0 Yes
    Granule Size                        4194304 No
    Maximum SGA Size                  947912704 No
    Startup overhead in Shared Pool   125829120 No
    Free SGA Memory Available                 0Also check
    SQL> select COMPONENT,CURRENT_SIZE,MIN_SIZE,MAX_SIZE,USER_SPECIFIED_SIZE from v$sga_dynamic_components;
    shared pool                                                         301989888  301989888          0           209715200
    large pool                                                            4194304    4194304          0             4194304
    java pool                                                             4194304    4194304          0             4194304
    streams pool                                                                0          0          0                   0
    DEFAULT buffer cache                                                616562688  616562688          0           603979776
    KEEP buffer cache                                                           0          0          0                   0
    RECYCLE buffer cache                                                        0          0          0                   0
    DEFAULT 2K buffer cache                                                     0          0          0                   0
    DEFAULT 4K buffer cache                                                     0          0          0                   0
    DEFAULT 8K buffer cache                                                     0          0          0                   0
    DEFAULT 16K buffer cache                                                    0          0          0                   0
    DEFAULT 32K buffer cache                                                    0          0          0                   0
    ASM Buffer Cache                                                            0          0          0           603979776
    13 rows selected.
    SQL>Edited by: CKPT on Sep 19, 2011 8:55 AM

  • Find more than one min and max in 2D array contain 0 rows

    Hi
    I have a 2D array and I would like to find the max and min elements between series of 0s. As you can see in the picture If I remove all 0s from the array and use the max and min function then I will have just one min and one max but I need to find min and max after every 0 rows so you can see from the picture ( just as an example) I will have 3 min and 3 max numbers. Would you please help me with this code. Do you now any algorithm that can find min and max between 0s?
    I have also attached my code to remove 0s and then search for max and min numbers but as I mentioned I need min and max for every part
    Many thanks
    Attachments:
    2.jpg ‏82 KB
    3.jpg ‏27 KB

    Thanks altenbach
    I have attached the vi to this post. I would really apperciate if you help me with this example. The min values should be 100, 1500 and 4000 and the max values should be 1200,2600,5400 so as u mentioned the output should be this 2D array 
    100,1200
    1500,2600
    4000,5400
    Attachments:
    new.vi ‏6 KB

  • MIN and MAX datetimes ti find  range

    I am using Oracle 11g version
    create table re(Name char(20),Datetime char(45),val1 number);
    insert into re values('abc','10/29/2012 13:00','1.5')
    insert into re values('abc','10/29/2012 13:05','1.5')
    insert into re values('abc','10/29/2012 13:10','1.5')
    insert into re values('abc','10/29/2012 13:15','1.5')
    insert into re values('abc','10/29/2012 13:20','0.00')
    insert into re values('abc','10/29/2012 13:25','0.00')
    insert into re values('abc','10/29/2012 13:30','0.00')
    insert into re values('abc','10/29/2012 13:35','0.00')
    insert into re values('abc','10/29/2012 13:40','2.1')
    insert into re values('abc','10/29/2012 13:45','2.3')
    insert into re values('abc','10/29/2012 13:50','2.1')
    insert into re values('abc','10/29/2012 13:55','2.1')
    insert into re values('abc','10/29/2012 14:00','2.2')
    O/P:
    In this way data is stored in database.Needed output is, I want the datetime column data range with min and max values where val1>0 only.
    Expected result while we consider the above data is::
    Name mintime maxtime
    abc 10/19/2012 13:00 10/19/2012 13:15
    abc 10/29/2012 13:40 10/29/2012 14:00
    For this I tried something like this,
    select name, min(to_date(Datetime ,'mm/dd/yyyy hh24:mi')) start, max(to_date(Datetime ,'mm/dd/yyyy hh24:mi')) end from (
    select name, Datetime ,to_date(Datetime ,'mm/dd/yyyy hh24:mi') - rank() over (partition by loc_name order by t1 asc) Val_col from re where val1 > 0
    ) group by lname, Val_col
    but I am getting the output like this for above query.
    name start end
    abc 10/29/2012 13:00 10/29/2012 13:00
    abc 10/29/2012 13:05 10/29/2012 13:05
    so.on.
    Edited by: 913672 on Apr 3, 2013 3:07 AM

    913672 wrote:
    I am using Oracle 11g version
    create table re(Name char(20),Datetime char(45),val1 number);
    insert into re values('abc','10/29/2012 13:00','1.5')
    insert into re values('abc','10/29/2012 13:05','1.5')
    insert into re values('abc','10/29/2012 13:10','1.5')
    insert into re values('abc','10/29/2012 13:15','1.5')
    insert into re values('abc','10/29/2012 13:20','0.00')
    insert into re values('abc','10/29/2012 13:25','0.00')
    insert into re values('abc','10/29/2012 13:30','0.00')
    insert into re values('abc','10/29/2012 13:35','0.00')
    insert into re values('abc','10/29/2012 13:40','2.1')
    insert into re values('abc','10/29/2012 13:45','2.3')
    insert into re values('abc','10/29/2012 13:50','2.1')
    insert into re values('abc','10/29/2012 13:55','2.1')
    insert into re values('abc','10/29/2012 14:00','2.2')
    O/P:
    In this way data is stored in database.Needed output is, I want the datetime column data range with min and max values where val1>0 only.
    Expected result while we consider the above data is::
    Name mintime maxtime
    abc 10/19/2012 13:00 10/19/2012 13:15
    abc 10/29/2012 13:40 10/29/2012 14:00
    For this I tried something like this,
    select name, min(to_date(Datetime ,'mm/dd/yyyy hh24:mi')) start, max(to_date(Datetime ,'mm/dd/yyyy hh24:mi')) end from (
    select name, Datetime ,to_date(Datetime ,'mm/dd/yyyy hh24:mi') - rank() over (partition by loc_name order by t1 asc) Val_col from re where val1 > 0
    ) group by lname, Val_col
    but I am getting the output like this for above query.
    name start end
    abc 10/29/2012 13:00 10/29/2012 13:00
    abc 10/29/2012 13:05 10/29/2012 13:05
    so.on.Firstly and most importantly do NOT store dates as char columns: that's what the DATE type is for.
    Secondly, i'm not sure how you get your output from the input, particularly as your SQL contains 'partition by loc_name' which
    doesn't even exist in your example table.
    Why has the same name got two rows with those min/max times. Are you partitioning by val1?

  • Find min and max from a bunch of numbers

    hi,
    i have a bunch of numbers, and i need to find the min and max.
    so i have a arraylist which contains objects....whats the best way to find the min number and max number of all these objects?
    thanks

    You're close, but you can do them all at the same time without temp variables..
    double maximumX = 0;
    double minimumX = 0;
    double maximumY = 0;
    double minimumY = 0;
    for (int i = 0; i < myobjects.size(); i++) {
         mything d2d = (mything) myobjects.get(i);
         maximumX = Math.max(d2d.getBounds().getMaxX(), maximumX);
         minimumX= Math.min(d2d.getBounds().getMinX(), minimumX);
         maximumY = Math.max(d2d.getBounds().getMaxY(), maximumY);
         minimumY = Math.min(d2d.getBounds().getMinY(), minimumY);
    }Since you are dealing with rectangles, you could add them all to an Area and get the bounds of the Area, but that's probably slower.

  • Query about min and max and middle row of a table

    suppose i have table emp and field
    v_date date;
    which has data in time stamp
    time
    10:20
    10:25
    10:30
    10:32
    10:33
    10:35
    10:36
    10:38
    I need only min time and max time and two record between min and max

    I need only min time and max time and two record between min and max Like this?
    SQL> create table t (id number);
    Table created.
    SQL>
    SQL> insert into t values (1020);
    1 row created.
    SQL> insert into t values (1025);
    1 row created.
    SQL> insert into t values (1030);
    1 row created.
    SQL> insert into t values (1032);
    1 row created.
    SQL> insert into t values (1033);
    1 row created.
    SQL> insert into t values (1035);
    1 row created.
    SQL> insert into t values (1036);
    1 row created.
    SQL> insert into t values (1038);
    1 row created.
    SQL>
    SQL> commit;
    Commit complete.
    SQL>
    SQL> select * from t;
         ID
       1020
       1025
       1030
       1032
       1033
       1035
       1036
       1038
    8 rows selected.
    SQL>
    SQL>
    SQL> select decode(rownum, 1, min_val, 4, max_val, next_val) your_data from (
      2  select first_value (id) over (partition by 'a' order by 'a') min_val,
      3         last_value (id) over (partition by 'a' order by 'a')  max_val,
      4         id,
      5         lead(id) over (partition by 'a' order by id) next_val
      6   from t
      7  order by id
      8   )
      9  where min_val <> next_val and max_val <> next_val
    10  and rownum <= 4;
    YOUR_DATA
         1020
         1030
         1032
         1038
    SQL>

  • SQL query to find top 5 users having more rows/data in table

    Dear experts,
    OS = HP-UX
    Database = Oracle 9.2.0.8
    AC users = 600
    Ex:-
    select * from all_users where username like 'AC%';
    AC_1
    AC_2
    AC_3
    AC_4
    AC_5
    AC_6
    AC_.
    AC_.
    AC_.
    AC_600
    Each AC user having same tables INCOMING, OUTGOING
    Now i need to find top 5 users having more rows/data in INCOMING , OUTGOING tables. I tried this:
    SQL>conn AC_1/pwd
    select 'select count(*) from '||table_name||';' from user_tables;
    But i get max counts info only for this AC_1 user , however, i need top 5 users having more rows/max counts query.
    Thank you,

    source : oracle forums
    May be , this one.. not tested though.
    Before doing this you need to have select_catalog_role
    WITH tmp
         AS (SELECT owner,
                    table_name,
                    TO_NUMBER (
                       EXTRACTVALUE (
                          xmltype (
                             DBMS_XMLGEN.getxml (
                                'select /*+ PARALLEL*/ count(*) c from '
                                || table_name)),
                          '/ROWSET/ROW/C'))
                       Cnt
               FROM dba_tables
              WHERE 1 = 1 AND table_name IN ('INCOMING', 'OUTGOING')),
         tmp1
         AS (SELECT a.*,
                    MAX (cnt)
                       OVER (PARTITION BY a.table_name ORDER BY a.cnt DESC)
                       maxcnt
               FROM tmp a)
    SELECT DISTINCT a.*
      FROM tmp a, tmp1 b
    WHERE a.cnt = b.maxcnt AND a.table_name = b.table_name;

  • Performance Issue using min() and max() in one SQL statement

    I have a simple query that selects min() and max() from one column in a table in one sql statment.
    The table has about 9 Million rows and the selected column has a non unique index. The query takes 10 secs. When i select min() and max() in separate statements, each takes only 10 msecs:
    This statement takes 10 secs:
    select min(date_key) , max(date_key)
    from CAPS_KPIC_BG_Fact_0_A
    where date_key != TO_DATE(('1900-1-1' ),( 'YYYY-MM-DD'))
    This statement takes 10 msecs:
    select min(date_key)
    from MYTABLE
    where date_key != TO_DATE(('1900-1-1' ),( 'YYYY-MM-DD'))
    union all
    select max(date_key) from MYTABLE
    Because the first statement is part of an autmatic generated SQL of an application, i can't change it and i have to optimize the data model. How can i speed up the first statement?

    I've ran similar query on a table that has 10 milliion rows, with an index on the date column
    This is what I have found:
    SQL> set timing on
      1  SELECT MIN(ID_DATE) MIN_DATE, MAX(ID_DATE) MAX_DATE
      2      FROM MY_DATE
      3*     WHERE ID_DATE != TO_DATE(('1900-1-1' ),( 'YYYY-MM-DD'))
    SQL> /
    MIN_DATE  MAX_DATE
    03-APR-76 06-JAN-02
    real: 43383
    SQL> SELECT MIN(ID_DATE) MIN_DATE FROM MY_DATE
      2   WHERE ID_DATE != TO_DATE(('1900-1-1' ),( 'YYYY-MM-DD'))
      3  UNION ALL
      4  SELECT MAX(ID_DATE) MAX_DATE FROM MY_DATE
      5   WHERE ID_DATE != TO_DATE(('1900-1-1' ),( 'YYYY-MM-DD'))
      6  /
    MIN_DATE
    03-APR-76
    06-JAN-02
    real: 20
    SQL> SELECT MIN_DATE, MAX_DATE FROM
      2  (SELECT MAX(ID_DATE) MAX_DATE FROM MY_DATE
      3  WHERE ID_DATE != TO_DATE(('1900-1-1' ),( 'YYYY-MM-DD')) ) A,
      4  (SELECT MIN(ID_DATE) MIN_DATE FROM MY_DATE
      5  WHERE ID_DATE != TO_DATE(('1900-1-1' ),( 'YYYY-MM-DD')) ) B
      6  /
    MIN_DATE  MAX_DATE
    03-APR-76 06-JAN-02
    real: 10
    SQL> My conculsion, there is nothing you can do to the tables that will improve that particular statement.
    Why can't you modify the application?

  • Formula for MIN and MAX per range required in BW

    Good day
    Please assist with the following? I need to create a formula (CKF) in BW Query which will give me the same result as the following formula in Excel.
    What I have is one Key Figure and want to calculate a Score on that key figure.
    Score =Key figure/(MAX(range of ie. column B1 to B50 which contains data for the same KF)-MIN(range of ie. column B50 which contains data for the same KF).
    In excel it's easy, ie" Score =TD completed/(MAX(B28:B130)-MIN(B28:B130)
    If more information is required to assist, please let me know?
    Always appreciated.
    Cornelius

    Thank U so much for responding so fast.
    I did the MIN and MAX formula, but it is only taking the MIN or MAX from the single cell of the applicable key figure and not from a 'range' of cells. This is a further example of what I want to do:
    Cell: B1 = 10
            B2 = 12
            B3 = 15
            B4 = 0
    I want to display the MIN as '0' and the MAX as '15' and then do the calculation per row.
    We are in 3.2x. I want to stay away from structures as I have not done that before.
    Any other assistance will be highly appreciated.
    Cornelius

  • Highlighting Min and Max Values on each line

    Hello,
    Is it possible to highlight the Min and Max values on each row of a Query. For example I have sales below by product line for the last seven quarters. The user
    would like the Max value (150) for Product Line ABC Highlighted as Green and the Min value (1055) color coded as Red. Like wise for each line - DEF 200 as green and 100 as red and GHI - 400 as green and 100 as red.
    FYQ Q207 Q307 Q407 Q108 Q208 Q308 Q408
    ABC     1500     1200     1400     1050     1100     1100     1100
    DEF     1550     1000     1560     1220     1340     1640     2000
    GHI     1000     2000     3000     4000     3250     2220     3750
    Is this possible using Exceptions? or may be any other means? We are on Bex 7.0
    Best Regards,
    Sanjiv

    Hello Sanjiv,  
    I think it can be done by JavaScript, but needs more effort
    [Use of JavaScript Functions|http://help.sap.com/saphelp_nw04/helpdata/en/d9/4a853bc623c075e10000000a114084/content.htm]
    Try the exception available in the BW[BW Stylesheets|http://help.sap.com/saphelp_nw04/helpdata/en/3f/ca453afbf37b54e10000000a11402f/content.htm]
    SAPBEXformats - Formatting cell (scaling factors)
    SAPBEXexcGood1 - Exception with priority good 1
    SAPBEXexcGood2 - Exception with priority good 2
    SAPBEXexcGood3 - Exception with priority good 3
    SAPBEXexcCritical4 - Exception with priority critical 4
    SAPBEXexcCritical5 - Exception with priority critical 5
    SAPBEXexcCritical6 - Exception with priority critical 6
    SAPBEXexcBad7 - Exception with priority bad 7
    SAPBEXexcBad8 - Exception with priority bad 8
    SAPBEXexcBad9 - Exception with priority bad 9
    See this thread,
    Change the colour of a cell text depending on the value Web Reports (NW04s)
    Thanks
    Chandran
    Edited by: Chandran Ganesan on Mar 19, 2008 4:27 PM

  • Min and max functions

    Hi,
    I need to perform a calculation:
    (max(min(C,2.375),0)+max(min(Y,2.375),0))/6
    if the value of c is less than 2.375 then it has to accept the value of C else 2.375.
    on it i need to perform the max operation.
    How can i do this?

    Hi,
    MIN and MAX, like all the aggrgate functions, take only one argument.
    Perhaps you're thinking of the row functions LEAST and GREATEST, which can take one or more arguments.
    For example:
    GREATEST ( LEAST ( c
                     , 2.375
             , 0
             )will return
    2.375 if c is greater than 2.375,
    0 if c is less than 0, or
    c otherwise.
    CAUTION: Unlike the aggregate functions, that ignore NULLs, GREATEST and LEAST will return NULL if any of their arguments are NULL.

  • Min and Max values from entire table

     Hi,
     i have requirement in which i need to find the min and max values from the entire table.
    See the sample data 
    create table test
    Sal1 int,
    Sal2 int,
    Sal3 int
    insert into test values (100,700,5700)
    insert into test values (200,3300,5300)
    insert into test values (4400,1200,3500)
    insert into test values (5400,5600,3100)
    i want the output as 100 and 5700.. how can i achieve this in a single query. Please through some light on this topic..!
    Thanking you in advance
    Regards,
    Balaji Prasad B
    Balaji - BI Developer

    Below is an example with a subquery for each of the queries Mohammad posted in order to return both min and max in a single result set.
    SELECT ( SELECT MAX(Maxx) AS Maxx
    FROM test UNPIVOT
    ( Maxx FOR E IN ( Sal1, Sal2, Sal3 ) ) AS unpvt
    ) AS Maxx
    , ( SELECT MIN(Minn) Minn
    FROM test UNPIVOT
    ( Minn FOR E IN ( Sal1, Sal2, Sal3 ) ) AS unpvt
    ) AS Minxx;
    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

  • QoS - Min and Max Thresholds

    Hello Everyone,
    I'm studying QoS and I'm wondering how does a Cisco Engineer find out what the best Minimum and Maximum Threshold rates are when using WRED?
    Where would one find these values?
    I'm under the impression that it requires a study that's based on the size of the queues, is that correct?
    But then, I come to the conclusion that even if the queues are big enough, application critical data like (VOIP) would suffer from delay..
    So, how do you calculate the min and max threshold values..
    Thanks ahead of time..
    PR

    Disclaimer
    The  Author of this posting offers the information contained within this  posting without consideration and with the reader's understanding that  there's no implied or expressed suitability or fitness for any purpose.  Information provided is for informational purposes only and should not  be construed as rendering professional advice of any kind. Usage of this  posting's information is solely at reader's own risk.
    Liability Disclaimer
    In  no event shall Author be liable for any damages whatsoever (including,  without limitation, damages for loss of use, data or profit) arising out  of the use or inability to use the posting's information even if Author  has been advised of the possibility of such damage.
    Posting
    Setting WRED parameters, for optimal performance, is (IMO) very tedious.  Lots of variables involved.
    For starters, it shouldn't normally be applied to traffic that's not rate-adaptive, such as VoIP.
    It works best for multiple large bulk data transfer TCP streams that are using dropped packets for their principle flow control.  Then it can be optimized to maximize their "goodput".
    To answer your question, you might study RED literature, and its many variants, found on the Internet.
    You also want to study, if you're not already very familiar, with how adaptive flow rate protocols, such as TCP, behave when packets are dropped.  (With TCP also be mindful of the different "flavors", i.e. Tahoe, Reno, New-Reno, etc.)
    If you have specific questions, post again to this thread, and I might be able to help.

  • Avg, Min and Max with a serious twist.....ASO

    Hi,
    I need to calc the Avg, Min and Max on Revenue. That's simple. However Every row of data the revenue falls into a bucket/range. For example revenue is in buckets '0 to 50' or '51 to 100' or '101 to 150' lets say. As I load data I load a '1' into a 'Count' measure depending on which bucket that row of data falls into. So I can get a total count for each bucket. So '0 to 50' might have a Count of 3. '51 to 100' might also have 3 and '101 to 150' has a 2. So my range count looks like:
    0 to 50 - 3
    51 to 100 - 3
    101 to 150 -2
    The trick is they only want the Avg, Min and Max on the rows that makeup the highest 'Count'. In this case that's 3. Problem is there are two ranges that meet this criteria. When that happens they want the Min, Max and Avg of the rows that make up the '51 to 100' bucket since it's the highest range.
    I can easily get the '3' by using the Max formula. So I know what the highest bucket is. Problem is I can't figure out for the life of me, how to pass only those rows that make up the '51 to 100' bucket into the Avg, Min and Max function.....
    I'm stumped and in dire need of something here. I have a spreadsheet that explains the problem better. If somehow I can get a flag on those rows I can easily Avg, Min and Max it. I just can't seem to figure out how to get a flag on only those rows of data.
    I'm willing to share my mocked up example and spreadsheet and .otl and sample data etc....
    Please help :)

    Why does this verify with Min?
    Min ( Filter ( CROSSJOIN ( Descendants ( [Service].CurrentMember),
    Filter ( CROSSJOIN ( Descendants ( [Segment].CurrentMember),
    Filter ( CROSSJOIN ( Leaves ( [Ranges].CurrentMember),
    Filter ( CROSSJOIN ( Descendants ( [Customer Type].CurrentMember),
    Filter ( CROSSJOIN ( Descendants ( [Zip Code].CurrentMember),
    Filter ( CROSSJOIN ( Descendants ( [Disposal Option].CurrentMember),
    Filter ( CROSSJOIN ( Descendants ( [Tickets].CurrentMember),
    Filter ( CROSSJOIN ( Descendants ( [Yardages].CurrentMember),
    Filter ( Descendants ( [Contract Year].CurrentMember),
    [High Range Max] = ( [High Range Max] , [All FHRev Ranges] ) )),
    [High Range Max] = ( [High Range Max] , [All FHRev Ranges] ) )),
    [High Range Max] = ( [High Range Max] , [All FHRev Ranges] ) )),
    [High Range Max] = ( [High Range Max] , [All FHRev Ranges] ) )),
    [High Range Max] = ( [High Range Max] , [All FHRev Ranges] ) )),
    [High Range Max] = ( [High Range Max] , [All FHRev Ranges] ) )),
    [High Range Max] = ( [High Range Max] , [All FHRev Ranges] ) )),
    [High Range Max] = ( [High Range Max] , [All FHRev Ranges] ) )),
    [High Range Max] = ( [High Range Max] , [All FHRev Ranges] ) ) , [FHRev] )
    And when I just change to Tail and put a 1 at the end it fails?
    Tail ( Filter ( CROSSJOIN ( Descendants ( [Service].CurrentMember),
    Filter ( CROSSJOIN ( Descendants ( [Segment].CurrentMember),
    Filter ( CROSSJOIN ( Leaves ( [Ranges].CurrentMember),
    Filter ( CROSSJOIN ( Descendants ( [Customer Type].CurrentMember),
    Filter ( CROSSJOIN ( Descendants ( [Zip Code].CurrentMember),
    Filter ( CROSSJOIN ( Descendants ( [Disposal Option].CurrentMember),
    Filter ( CROSSJOIN ( Descendants ( [Tickets].CurrentMember),
    Filter ( CROSSJOIN ( Descendants ( [Yardages].CurrentMember),
    Filter ( Descendants ( [Contract Year].CurrentMember),
    [High Range Max] = ( [High Range Max] , [All FHRev Ranges] ) )),
    [High Range Max] = ( [High Range Max] , [All FHRev Ranges] ) )),
    [High Range Max] = ( [High Range Max] , [All FHRev Ranges] ) )),
    [High Range Max] = ( [High Range Max] , [All FHRev Ranges] ) )),
    [High Range Max] = ( [High Range Max] , [All FHRev Ranges] ) )),
    [High Range Max] = ( [High Range Max] , [All FHRev Ranges] ) )),
    [High Range Max] = ( [High Range Max] , [All FHRev Ranges] ) )),
    [High Range Max] = ( [High Range Max] , [All FHRev Ranges] ) )),
    [High Range Max] = ( [High Range Max] , [All FHRev Ranges] ) ) , 1 )

  • Min and MAx Value in a SELECT Statement

    Hi,
    I have a scenario where I am Selecting the values BETWEEN MIN and MAX values:
    SELECT * FROM ABC WHERE CODE BETWEEN MIN(CODE) AND MAX(CODE)
    ITS GETTING Error as:ORA-00934: group function is not allowed here
    Any help will be needful for me.

    select substr(no,1,3)||to_char(substr(no,4,1)+1) "first missing number"
    from
    with t as
    (select 'ABC1' no from dual
    union select 'ABC2' from dual
    union select 'ABC3' from dual
    union select 'ABC5' from dual
    union select 'ABC6' from dual
    union select 'ABC8' from dual
    select no, lead(no,1,0) over (order by no) next_no from t
    where substr(next_no,4,1) - substr(no,4,1) > 1
    and rownum = 1;

Maybe you are looking for

  • Online GL Account Analysis inquiry

    is there any online inquiry that displays all transactions against a single Account Code Combinition e.g. 01.110.6160.1400.110 and during a specific period e.g. between 01-JAN-2010 to 14-APR-2010? Further, is there a drill down available in this Form

  • Fail to ping to Solaris 10 system.

    I install Solaris 10 but sometime I could not ping to system but sometime it is ok to ping. Is there any problem with network configuration in Solaris 10 or it is a network environment because I rent my server in the share rack (Data Center) and I do

  • Cannot find m1212nf multifunction printer driver to install on w/2008 terminal server (64bit).

    Cannot find m1212nf multifunction printer driver to install on w/2008 terminal server (64bit).  The existing driver wants me to connect the printer using USB.  The printer is in another facility I am trying to support.

  • REFERENCE VALUES BETWEEN REPORTS MODULES COMPONENTS IN DESIGNER6I

    Good afternoon; I am building a report in Designer 6i which inludes 4 different module components. My question is.. How can you verify (and pass) a field's actual value between module components? Thank you, Michel Turcot

  • Adding Text Effects to Photos in iMovie 09

    I am making a movie in iMovie 09 from photos. I have 940 pictures with lead in effects and text over the pictures. I have not added music yet and am about half way through the 940 photos and iMovie will not allow me to add text to any more pictures.