Get the MAX value of dimension 2 table

I have a little trouble to find a value MAX (or MIN) of the second dimension in a 2-dimensional array. I do a query and the first dimension is the column name, the second is the values. I'm coming out of the MAX value of the column in the second dimension. ArrayMax said "the array passed cannot contain more than one dimension."

Any ideas? I'm sure that this is possible.

MaxValue = ArrayMax (QueryName ["FieldName"]);

or Q of Q.

Tags: ColdFusion

Similar Questions

  • How to get the Max value in Essbase

    Hello

    I have problem to get the max value of 3 years in Essbase.
    How can I get the max value of Dec 2009, Dec 2010, Dec 2011.
    Suppose the value of Dec 2009 = 1000, dec 2010 = 1500 and Dec 2011 = 2000
    I want to get the max value of these three value, how can I do this in the Essbase calculation Script.
    Any idea?


    Thank you.

    Kind regards

    Joni

    You did not specify if year and period are there separate dimensions, in any case as always a number of different possbilities and I don't have much time today to think about, but only one method can be to use @MAXRANGE

    DIFFICULTY (other members to set, 'Dec')

    'MemberToStoreAgainst' = @MAXRANGE("MemberToFindMaxRangeFor","2009:"2011");

    ENDFIX

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Get the Max values and average of the different cycles in the single channel

    Hello

    I'm trying to get the Max values and average of the single channel that has different cycles it contains. I tried to use commands such as Chnclasspeak3 and chnpeakfind, but they were not useful for me. What I need is the Max values and average of the different cycles numbers saved in the data channel.

    Exampld if the string contains 5 numbers of repetitive cycles, then we must find the maximum values and the average of these 5 cycles in the single channel. Attached reference data. This is the .raw file and I have the plugin for it to use in diadem 11.1.

    Kind regards

    X. Ignatius

    Hello, Ignatius,.

    Sorry, it took some time to provide a replacement based on the script for the function. Please take a look at the attached script. I changed the script to use my function if the tiara-version is less than 12. My script function is not as fast and more stable than the implementation of tiara, but for now, it does the job

    Andreas

  • Get the max value with other areas

    Hi all

    I have a table as below

    Value name
    - - - - - - - - - - - - - - - -
    A1 5
    A3 10
    A2 7
    A2 9
    A1 10

    What I get is the max (Value) and with the consolidation of its name

    Value name
    - - - - - - - - -
    A2 16

    Thank you
    Alex

    Published by: user8606416 on June 1, 2011 10:17

    Published by: user8606416 on June 1, 2011 10:26

    Depends on how you feel on one of the links of:

    SELECT name, value
    FROM (SELECT name, SUM(value)
          FROM table
          GROUP BY name
          ORDER BY 2 DESC)
    WHERE rownum = 1
    
    SELECT name, SUM(value)
    FROM table
    GROUP BY name
    HAVING SUM(value) >= ALL (SELECT SUM(value)
                              FROM table
                              GROUP BY name)
    

    among many other methods. The first takes a single arbitrary registration in the case of a tie, and the second shows all the related records.

    John

  • How to get the Max value with other columns data also.

    Suppose that a query is covered with the data as

    Time of ID
    01 07/12/2014
    02 07/05/2014
    03 16/07/2014
    04 07/07/2014

    I need to get the ID and time to time max.
    that is, should I get
    Time of ID
    03 16/07/2014

    To do this, I wrote a query that gives me necessary data. But I thought that's the best way?
    Is it an effective way to get this data?
    My query that returns the data required is:

    SELECT ID, MAX_DT FROM
    (
    Select 'DUMMY', ID, TIME1, MAX (TIME1) OVER (PARTITION 'DUMMY') AS MAX_DT FROM TAB1
    WHERE ID IN (BLAH BLAH)
    )
    WHERE MAX_DT = (EDT) 1

    Frank mentioned links


    WITH test_data (id, time) LIKE)

    SELECT 01, to_date('2014/07/12','yyyy-mm-dd') FROM dual

    UNION ALL

    SELECT 02, to_date('2014/07/16','yyyy-mm-dd') FROM dual

    UNION ALL

    SELECT 03, to_date('2014/07/16','yyyy-mm-dd') FROM dual

    UNION ALL

    SELECT 04, to_date('2014/07/07','yyyy-mm-dd') FROM dual

    )

    SELECT id, time

    go (select id,

    time,

    Max (Time) on latest_time (order by time lines between unbounded preceding and following unbounded)

    of test_data

    )

    where time = latest_time

    ID TIME
    3 16/07/2014
    2 16/07/2014

    Concerning

    Etbin

  • get the max value date in plsql

    My data in the table are like that

    Date Col1, Col2
    01/01/2012 A01 100
    01/01/2012 B01 200
    01/01/2012 C01 200

    01/02/2012 C01 100

    01/03/2012 B01 100


    I want to show the result of the query with carry on data like this

    01/01/2012 A01 100
    01/01/2012 B01 200
    01/01/2012 C01 200

    01/02/2012 A01 100
    01/02/2012 B01 200
    01/02/2012 C01 100

    01/03/2012 A01 200
    01/03/2012 B01 100
    01/03/2012 C01 100

    Please help me.

    Hello

    Welcome to the forum!

    If not, post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and the results desired from these data.
    Explain, using specific examples, how you get these results from these data.
    Always say what version of Oracle you are using (for example, 11.2.0.2.0).
    See the FAQ forum {message identifier: = 9360002}

    I think you want an outer join partitioned (to make sure that all dates are represented for all values in col1) and the analytical LAST_VALUE function, like this:

    WITH     all_dates     AS
    (
         SELECT DISTINCT  dt     -- DATE is not a good column name
         FROM              table_x
    )
    SELECT       a.dt
    ,       x.col1
    ,       LAST_VALUE (col2 IGNORE NULLS) OVER ( PARTITION BY  x.col1
                                                    ORDER BY      a.dt
                                   )           AS col2_shown
    FROM             all_dates  a
    LEFT OUTER JOIN      table_x    x  PARTITION BY  (x.col1)
                                   ON  x.dt = a.dt
    ;
    

    If you would care to post CREATE TABLE and INSERT statements for your sample data, and then I could test this.

  • get the max value

    Hi all
    I have the following data
    with table1 as
    (
      select to_date('01/01/2010', 'mm/dd/yyyy') dt, 2 cid from dual
      union all
        select to_date('03/01/2010', 'mm/dd/yyyy') dt, 1 cid from dual
      union all
        select to_date('03/01/2010', 'mm/dd/yyyy') dt, 3 cid from dual
      union all
      select to_date('05/11/2010', 'mm/dd/yyyy') dt, 4 cid from dual
    
    ) 
    I would like to write a query that gives me the dt max with the corresponding id.
    for example, if I specify to_date (April 1, 2010 ', ' dd/mm/yyyy') then the output should be

    CID DT
    ===============
    2010-03-01 3

    If I said on 02/01/2010 then the output should be

    CID DT
    ===============
    01/01/2010 2


    as you can see, I want max < specify the date. I also specify the corresponding cid which belongs to this date
    can someone help me write a query that gives result above
    with table1 as
    (
      select to_date('01/01/2010', 'mm/dd/yyyy') dt, 2 cid from dual
      union all
        select to_date('03/01/2010', 'mm/dd/yyyy') dt, 1 cid from dual
      union all
        select to_date('03/01/2010', 'mm/dd/yyyy') dt, 3 cid from dual
      union all
      select to_date('05/11/2010', 'mm/dd/yyyy') dt, 4 cid from dual
    
    )
    select max(dt) max_dt,
             max(cid) keep (dense_rank last order by dt)  cid
    from table1
    where dt <= to_date('04/01/2010', 'mm/dd/yyyy') -- perhaps you need "<" instead of "<=" here !
    
    with table1 as
    (
      select to_date('01/01/2010', 'mm/dd/yyyy') dt, 2 cid from dual
      union all
        select to_date('03/01/2010', 'mm/dd/yyyy') dt, 1 cid from dual
      union all
        select to_date('03/01/2010', 'mm/dd/yyyy') dt, 3 cid from dual
      union all
      select to_date('05/11/2010', 'mm/dd/yyyy') dt, 4 cid from dual
    
    )
    select max(dt) max_dt,
             max(cid) keep (dense_rank last order by dt) cid
    from table1
    where dt <= to_date('01/02/2010','mm/dd/yyyy')  -- perhaps you need "<" instead of "<=" here !
    

    Published by: hm on 25.10.2010 12:57

  • How to get the last value

    Hi I have a senerion in which I want to get the last value: -.
    CREATE TABLE T1
    (NAME VARCHAR2(10), NO NUMBER, NO2 NUMBER);
    
    INSERT INTO T1 VALUES('A',10,20);
    INSERT INTO T1 VALUES('C',100,2);
    INSERT INTO T1 VALUES('B,124,5);
    INSERT INTO T1 VALUES('A',1,400);
    INSERT INTO T1 VALUES('B,2,234);
    INSERT INTO T1 VALUES('B',2,7);
    INSERT INTO T1 VALUES('C',21,12);
    INSERT INTO T1 VALUES('A',3,300);
    INSERT INTO T1 VALUES('B,55,1);
    INSERT INTO T1 VALUES('C',234,1);
    INSERT INTO T1 VALUES('B',20,72);
    INSERT INTO T1 VALUES('A',200,0);
    INSERT INTO T1 VALUES('B',546,32);
    INSERT INTO T1 VALUES('C',89,888);
    
    INSERT INTO T1 VALUES('B',485,12);
    INSERT INTO T1 VALUES('C',1,77);
    INSERT INTO T1 VALUES('B',339,12);
    INSERT INTO T1 VALUES('A',0,300);
    {\code}
    
    Now for all  A i want the value (order by name,no,no2) i.e value of no2 0
    for all b i want 32
    and for all c i want 1
    
    i.e last value in order by clause.
    
    i tried this 
    
     select name,no,no2,last_value(no2)
     over(PARTITION BY  name order by no,no2) nm
     from t1
    
    can anyone please help me?
    
    Thanks
    
    Edited by: vinod on Jan 6, 2012 8:58 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        

  • Update based on the max value of different tables.

    {code}

    create the table rule_table (number rule_id);

    insert into rule_table values (10);

    insert into rule_table values (20);

    insert into rule_table values (30);

    insert into rule_table values (40);

    create the table auth_table (number of auth_id, rule_id number);

    insert into auth_table values (1000, 10);

    insert into auth_table values (2000, 10);

    insert into auth_table values (3000, 10);

    insert into auth_table values (4000, 20);

    insert into auth_table values (5000, 20);

    insert into auth_table values (6000, 30);

    insert into auth_table values (7000, 30);

    insert into auth_table values (8000, 40);

    insert into auth_table values (9000, 40);

    create the table pay_table (pay_id number, auth_id number, pay_indicator number);

    insert into pay_table values (11111, 1000, 0);

    insert into pay_table values (22222, 1000, 1);

    insert into pay_table values (33333, 1000, 0);

    insert into pay_table values (44444, 2000, 0);

    insert into pay_table values (55555, 2000, 1).

    insert into pay_table values (66666, 2000, 0);

    insert into pay_table values (77777, 3000, 0);

    insert into pay_table values (88888, 3000, 0);

    insert into pay_table values (99999, 4000, 0);

    insert into pay_table values (111111, 4000, 0);

    insert into pay_table values (222222, 5000, 0);

    insert into pay_table values (333333, 5000, 0);

    insert into pay_table values (444444, 6000, 0);

    insert into pay_table values (555555, 7000, 1);

    insert into pay_table values (666666, 8000, 0);

    insert into pay_table values (777777, 9000, 0);

    insert into pay_table values (888888, 9000, 1);

    create the table rule_pay (rule_id number, pay_max_indicator number);

    insert into rule_pay values (10, 0);

    insert into rule_pay (20, 0) values;

    insert into rule_pay (30, 0) values;

    insert into rule_pay (40, 0) values;

    {code}

    My intention is:

    for every find of rule_id on the maximum pay_indicator (tables 3 query to get the max Show pay_indicator below) and on the other table I have to update this value max based on rule_id.

    with max_tab

    as

    (

    Select a.rule_id, max (pay_indicator) pay_indicator

    rule_table a.,

    b auth_table,

    c pay_table

    where a.rule_id = b.rule_id

    and b.auth_id = c.auth_id

    A.rule_id group

    )

    Update rule_pay

    Set pay_max_indicator = (select max_tab.pay_indicator

    of max_tab

    where max_tab.rule_id = rule_pay.rule_id)

    where

    rule_id in (select rule_id from max_tab);

    The above query does not.

    Any help or suggestions are greatly appreciated.

    Something like that?

    SQL > select * from rule_pay;

    RULE_ID PAY_MAX_INDICATOR

    -------------------- --------------------

    10                    0

    20                    0

    30                    0

    40                    0

    SQL > fusion in rule_pay PR

    2. using (select a.rule_id, max (pay_indicator) pay_indicator

    rule_table 3A,

    auth_table 4 b,

    pay_table 5 c

    6 where a.rule_id = b.rule_id

    7 and b.auth_id = c.auth_id

    Group 8 by a.rule_id

    9        ) u

    10 on (u.rule_id = rp.rule_id)

    11 when matched, then update

    12 set rp.pay_max_indicator = u.pay_indicator

    13;

    4 lines merged.

    SQL > select * from rule_pay;

    RULE_ID PAY_MAX_INDICATOR

    -------------------- --------------------

    10                    1

    20                    0

    30                    1

    40                    1

    BTW, you can't put a WITH clause before an update.  It can only precede a select statement.

  • How can I get the max of a measurement value

    How can I get the max of a measurement value?

    http://forums.NI.com/T5/LabVIEW/how-can-I-return-the-maximum-value-from-a-voltage-sensor-over/m-p/30...

    I tried the while loop max-min-solution described in this link. But this using my myRio acceleration measurement no longer works. It seems to hang.

    I use the I2C Communication.

    The inner circle while loop is a bad construction.  It will be either executed once, if enter the Boolean value is True, or forever if the value is false.

    Put your records on the timed loop shift and eliminate inside while loop.  Then your code should work.

  • How to get the max sequence number when some record exists in the database table

    Hello

    I need to create the sequence that he should leave value max already exists in the table.

    Example:
    I have a table as below:

    ID NAME
    1A
    1 a
    3 C
    4 D


    Now, during the creation of sequence it should start from 5 but I should ' t START WITH 5 hard-code in the sequence to create. Is it possible to do without Hardcoding the max value in the sequence. It automatically brings the value max + 1 for the next data when I insert.


    CREATE THE TEST_SEQ SEQUENCE. NEXTVAL
    START WITH [Max + 1 val of the table]
    MAXVALUE 9999999999999999999999999999
    MINVALUE 1
    NOCYCLE
    CACHE 20
    ALL;


    Thank you...

    Published by: 998976 on April 18, 2013 04:37

    Published by: 998976 on April 18, 2013 04:38

    Hello

    All the numbers in a CREATE SEQUENCE statement are literals; no other types of numeric expressions are allowed.
    You need dynamic SQL statements to do something like what you want. For example:

    COLUMN     seq_start_col     NEW_VALUE  seq_start
    
    SELECT     1 + MAX (val)     AS seq_start_col
    FROM     table_x;
    
    CCREATE SEQUENCE TEST_SEQ.NEXTVAL
    START WITH  &seq_start
    MAXVALUE 9999999999999999999999999999
    MINVALUE 1
    NOCYCLE
    CACHE 20
    NOORDER;
    
  • How to get the Max of elements of type datetime value

    Hi all
    I wanted to get the last value timestamp (DateTime data type) of the node list. I have the following xml. In this xml file, I want to get the modifydate element that has the last time stamp via xquery/xpath, it should return me following result 2011-09-29 T 17: 21:17 + 10:00

    < CustomerList >
    < CustomerDetails >
    < Name > Test 1 < / name >
    assets of < status > < / status >
    < modifyDate > 2011-08-20T 17: 21:17 + 10:00 < / modifyDate >
    < / CustomerDetails >

    < CustomerDetails >
    < Name > Test 2 < / name >
    Cancel < status > < / status >
    < modifyDate > 2011-08-29T 17: 21:17 + 10:00 < / modifyDate >
    < / CustomerDetails >

    < CustomerDetails >
    < Name > Test 3 < / name >
    assets of < status > < / status >
    < modifyDate > 2011-09-29T 17: 21:17 + 10:00 < / modifyDate >
    < / CustomerDetails >
    < / CustomerList >


    I tried to use the
    CustomerList/CustomerDetails/modifyDate [not (. < =... / the above - sibling:CustomerList/CustomerDetails modifyDate) and not (. < =... / following - sibling:CustomerList/CustomerDetails modifyDate)]
    But it does not work on the datetime data type.
    Any help in this regard is highly appreciated.

    Concerning

    Published by: user6736659 on Sep 5, 2011 06:15

    Hello

    The following XQuery query should give you what you want:

    max(
     for $i in /CustomerList/CustomerDetails/modifyDate
     return xs:dateTime($i)
    )
    

    For example, by using Oracle SQL:

    SQL> var xmldoc varchar2(4000)
    SQL> begin
      2   :xmldoc := '
      3  
      4   Test 1
      5  active
      6  2011-08-20T17:21:17+10:00
      7  
      8
      9  
     10   Test 2
     11  cancel
     12  2011-08-29T17:21:17+10:00
     13  
     14
     15  
     16   Test 3
     17  active
     18  2011-09-29T17:21:17+10:00
     19  
     20  ';
     21  end;
     22  /
    
    PL/SQL procedure successfully completed
    
    SQL> select xmlquery('max(
      2   for $i in /CustomerList/CustomerDetails/modifyDate
      3   return xs:dateTime($i)
      4  )'
      5  passing xmltype(:xmldoc)
      6  returning content
      7  )
      8  from dual
      9  ;
    
    XMLQUERY('MAX(FOR$IIN/CUSTOMER
    --------------------------------------------------------------------------------
     2011-09-29T17:21:17.000000+10:00
     
    
  • To get the old value and the new value

    create table test (ID NUMBER,
    Number of REV,
    Number FIELD_ID,
    FieldName varchar2 (200),
    ACTION varchar2 (50).
    Field_value varchar2 (200),
    MODIFIED_BY varchar2 (50).
    Date MODIFIED_DATE);

    Insert into TEST (ID, REV, FIELD_ID, FIELD_NAME, ACTION, FIELD_VALUE, MODIFIED_BY, MODIFIED_DATE) values (1007,283,12,'status','UPDATE','Started','2002',to_date('13-DEC-13','DD-MON-RR'));
    Insert into TEST (ID, REV, FIELD_ID, FIELD_NAME, ACTION, FIELD_VALUE, MODIFIED_BY, MODIFIED_DATE) values (1007,224,12,'status','UPDATE','preview','2002',to_date('12-DEC-13','DD-MON-RR'));
    Insert into TEST (ID, REV, FIELD_ID, FIELD_NAME, ACTION, FIELD_VALUE, MODIFIED_BY, MODIFIED_DATE) values (1007,290,12,'status','UPDATE','revision','2002',to_date('14-DEC-13','DD-MON-RR'));


    Insert into TEST (ID, REV, FIELD_ID, FIELD_NAME, ACTION, FIELD_VALUE, MODIFIED_BY, MODIFIED_DATE) values (1008,283,12,'status','UPDATE','Started','2002',to_date('13-DEC-13','DD-MON-RR'));
    Insert into TEST (ID, REV, FIELD_ID, FIELD_NAME, ACTION, FIELD_VALUE, MODIFIED_BY, MODIFIED_DATE) values (1008,224,12,'status','UPDATE','preview','2002',to_date('12-DEC-13','DD-MON-RR'));
    Insert into TEST (ID, REV, FIELD_ID, FIELD_NAME, ACTION, FIELD_VALUE, MODIFIED_BY, MODIFIED_DATE) values (1008,290,12,'status','UPDATE','teststat','2002',to_date('14-DEC-13','DD-MON-RR'));

    1007 283 12 status of started the UPDATE 2002 13 December 13
    1007 224 12 status update overview 2002 12 December 13
    12 290 1007 State review UPDATED 2002 December 14, 13
    1008 283 12 status of started the UPDATE 2002 13 December 13
    1008 224 12 status update overview 2002 12 December 13
    1008 290 12 intensified status 2002 Update December 14, 13

    I need to Get for each id for each field Ineed to get the old value and new_value.


    Planned result for the simulacrum of the data is:

    ID FIELD_NAME ACTION OLD_FIELD_VALUE NEW_FIELD_VALUE MODIFIED_BY MODIFIED_DATE
    1007 status UPDATE started review 2002 December 14, 13
    1008 State updated started intensified 2002 December 14, 13


    Thank you
    Ann

    Hello

    9728f65c-CE79-4c28-9efb-9e76dc6eaf8b wrote:

    Yes I need a production line for all id.the the last rows should be the one with the highest rev.

    Then use id where I guessed a group of columns starting with id and rev in most of the places where I used modifed_date:

    WITH got_analytics AS

    (

    SELECT id, field_name, action

    LAG (field_value) over (PARTITION BY ID.

    ORDER BY rev

    ) AS old_field_value

    field_value AS new_field_value

    modified_by

    modified_date

    rev

    MAX (rev) over (PARTITION BY id)

    AS max_rev

    OF the test

    )

    SELECT id, field_name, old_field_value, new_field_value, modified_by, modified_date

    OF got_analytics

    WHERE rev = max_rev

    ORDER BY id

    ;

  • Get the max of a field in a query of County

    Hi, I work with the following SQL query:
    WITH ORDERED_QUERY AS
    (
    SELECT COUNT(SHRTRIT_SBGI_CODE) AS "COUNT OF I",
                SHRTRIT_SBGI_CODE AS "SBGI CODE",
                SHRTRIT_SBGI_DESC AS "INSTITUTION"
    FROM SHRTRIT
    WHERE (SHRTRIT_SBGI_CODE LIKE 'I%'
    GROUP BY SHRTRIT_SBGI_CODE,SHRTRIT_SBGI_DESC
    ORDER BY "COUNT OF I" DESC
    )
    SELECT "COUNT OF I","SBGI CODE","INSTITUTION" 
    FROM ORDERED_QUERY
    WHERE ROWNUM <= 20
    What follows is the table mark code to get a test table:
    create table SHRTRIT
    (
    SBGI_CODE     VARCHAR2(6)     NOT NULL
    SBGI_DESC     VARCHAR2(10)
    ACTIVITY_DATE     DATE
    )
    /
    INSERT INTO SHRTRIT
    (SBGI_CODE,SBGI_DESC,ACTIVITY_DATE)
    VALUES
    (I08883,MING-CHUAN COLL,10/6/2007 1:47:01 PM)
    /
    INSERT INTO SHRTRIT
    (SBGI_CODE,SBGI_DESC,ACTIVITY_DATE)
    VALUES
    (I08883,MING-CHUAN COLL,2/10/2009 3:00:14 AM)
    /
    INSERT INTO SHRTRIT
    (SBGI_CODE,SBGI_DESC,ACTIVITY_DATE)
    VALUES
    (I08883,MING-CHUAN COLL,10/6/2007 12:11:56 PM)
    /
    INSERT INTO SHRTRIT
    (SBGI_CODE,SBGI_DESC,ACTIVITY_DATE)
    VALUES
    (I08883,MING-CHUAN COLL,2/10/2009 3:00:15 AM)
    /
    INSERT INTO SHRTRIT
    (SBGI_CODE,SBGI_DESC,ACTIVITY_DATE)
    VALUES
    (I07979,RIYADH TECHNICAL COLLEGE,9/11/2008 3:01:26 AM)
    /
    INSERT INTO SHRTRIT
    (SBGI_CODE,SBGI_DESC,ACTIVITY_DATE)
    VALUES
    (I07979,RIYADH TECHNICAL COLLEGE,7/6/2010 9:00:02 PM)
    /
    {CODE}
    
    What I'm trying to do is get the max ACTIVITY_DATE for the institution when it's listed. For example, the max ACTIVITY_DATE for MING-CHUAN COLL is 2/10/2009 3:00:15 AM. The desired output is one record for MING-CHUAN, with a count of 4, the SBGI code, the Institution Name, and the max activity date of 2/10/2009 3:00:15 AM. However, when I just insert MAX(SHRTRIT_ACTIVITY_DATE) as part of the in-line query, it doesn't work like you'd think. It makes separate records for each date, such that here, there would be one record for 2/10/2009 with a count of 2 and one record for 10/6/2007 with a count of 2 for MING-CHUAN. 
    
    It might actually work with this small amount of data, I don't know because I can't make a test table with these few records to find out. It certainly isn't working with the actual table. I know it has something to do with the aggregation, but I'm not quite sure how to get around this problem. I've tried some different things, but none of them have gotten the desired results.
    
    Any help that you might be able to provide would be greatly appreciated!
    
    Thanks so much,
    Michelle Craig
    Data Coordinator
    Admissions operations and transfer services
    Kent State University                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        

    Not exactly what you're trying to do, but:

    SQL> SELECT  *
      2    FROM  SHRTRIT
      3  /
    
    SBGI_C SBGI_DESC                      ACTIVITY_DATE
    ------ ------------------------------ ----------------------
    I08883 MING-CHUAN COLL                10/06/2007 01:47:01 pm
    I08883 MING-CHUAN COLL                02/10/2009 03:00:14 am
    I08883 MING-CHUAN COLL                10/06/2007 12:11:56 pm
    I08883 MING-CHUAN COLL                02/10/2009 03:00:15 am
    I07979 RIYADH TECHNICAL COLLEGE       09/11/2008 03:01:26 am
    I07979 RIYADH TECHNICAL COLLEGE       07/06/2010 09:00:02 pm
    
    6 rows selected.
    
    SQL> WITH ORDERED_QUERY AS (
      2                         SELECT  COUNT(SBGI_CODE) AS "COUNT OF I",
      3                                 SBGI_CODE AS "SBGI CODE",
      4                                 SBGI_DESC AS "INSTITUTION",
      5                                 MAX(ACTIVITY_DATE) LAST_ACTIVITY_DATE
      6                           FROM  SHRTRIT
      7                           WHERE SBGI_CODE LIKE 'I%'
      8                           GROUP BY SBGI_CODE,SBGI_DESC
      9                           ORDER BY "COUNT OF I" DESC
     10                        )
     11  SELECT  "COUNT OF I",
     12          "SBGI CODE",
     13          "INSTITUTION",
     14          LAST_ACTIVITY_DATE
     15    FROM  ORDERED_QUERY
     16    WHERE ROWNUM <= 20
     17  /
    
    COUNT OF I SBGI C INSTITUTION                    LAST_ACTIVITY_DATE
    ---------- ------ ------------------------------ ----------------------
             4 I08883 MING-CHUAN COLL                02/10/2009 03:00:15 am
             2 I07979 RIYADH TECHNICAL COLLEGE       07/06/2010 09:00:02 pm
    
    SQL> 
    

    SY.

  • Get the highest value of acquired data

    Hi, how can I get the highest value of data according to data acquired using the accelerometer ADXL345 and LINX in LabVIEW?

    I want the highest data to be shown with a flag. However, the data being shown are always the last acquired data. My problem would be what happens if the highest data somewhere at the beginning or in the middle of all the acquired data? How to display the highest data using an indicator?

    Here's a look at my front, block diagram, and sample of the acquired data.

    From the front panel, the basic indicator of detected last poster 0.1929 (amplitude), which is the last value. But looking at the Excel file, the highest data are data which is 0.2013. The highest, I want to be displayed on the indicator not the last value. How do I do that?

    Thank you!

    I gave you an example of what you need to do - it is not okay if wire you the new value and the old value for the X or Y - it will always return the maximum of the two values so the order doesn't matter. It would have been more useful if you had posted what you tried the max & min. You need a registry to offset inside the loop (like I did with my while loop). If you only want to display the maximum value for each iteration of the loop for external, you must initialize the shift register by plugging a 0 to its terminal on the left. A shift register her pinned the value of the last run - probably not what you want here.

Maybe you are looking for