Determination of running Max and Min values

Please I need help on getting my minimum value if poster I have it cable like my value max but the min just rest a 0 can someone help me I do not understand what im doing wrong. looking at my drawing, I don't see how it is possible for me to not receive a value in my min indicator, I enclose my vi below

Add the wire highlighted.

Two things:

  1. This should work as a subvi if you as useful feedback nodes.
  2. See what you can find on the shift uninitialized registers.  You must initialize the node 'Min' Feedback with the random number (first) or you will get the default value for this type of data - the zero that you saw.

Tags: NI Software

Similar Questions

  • Max and Min value for each column

    Hello!

    Can someone help me to change my. VI? I want to get the Min and Max value for each column in the table in the appendices. Then I need to create two tables 1 d - the first with the min and the second with the max value.

    I've already solved the problem the solution is below

  • drop the max and min values

    Hi all

    I have a table with the following columns that contain the ranks of teams as follows:
    A-B-C-D-E-F
    20-21-22-23-24-20
    21-23-32-25-22-19
    24-23-16-24-24-22

    I need a calculation of percentage where I drop the highest and the lowest in each team ranks, then divide the total by 100 remaining.

    for the first record:
    20 is the minimum and 24 max would be the percentage (21 + 22 + 23 + 20) / 100
    for the second record:
    percentage = (25 + 21 + 23 + 22) / 100
    the third record:
    percentage = (23 + 24 + 24 + 22) / 100

    Thank you
    Sneha

    Like this?

    SQL> WITH t AS (
      2  SELECT 20 a, 21 b, 22 c, 23 d, 24 e, 20 f FROM dual UNION ALL
      3  SELECT 21, 23, 32, 25, 22, 19 FROM dual UNION ALL
      4  SELECT 24, 23, 16, 24, 24, 22 FROM dual)
      5  SELECT ((a + b + c + d + e + f) - GREATEST(a, b, c, d, e, f) - LEAST(a, b, c, d, e, f)) /100 mids
      6  FROM t;
    
          MIDS
    ----------
           .86
           .91
           .93
    

    John

  • How to find the value max and min for each column in a table 2d?

    How to find the value max and min for each column in a table 2d?

    For example, in the table max/min for the first three columns would be 45/23, 14/10, 80/67.

    Thank you

    Chuck,

    With color on your bars, you should have enough experience to understand this.

    You're a loop in the table already.  Now you just need a function like table Max and min. loop.  And you may need to transpose the table 2D.

  • Max and min to find examples of data

    I'm discerning the max and min of cycle data values. We have about 20 data points for each cycle and I need make the max and min out of it. I tried to write a script for this but it takes way to long to run. Do not complete our largest files (over 1 million points of data) with my script and DIAdem crash.  I also tried the peak built by finding functions, but they come with data points that are not max or min. Here is my script below:

    Dim cyclemin
    Dim cyclemax
    Dim cyclecount
    Dim displacementmax, displacementmin
    Dim channelcount
    Dim i, j, k, g, a, m
    cyclemin = CMin ('Cycle Count')
    cyclemax = CMax ('Cycle Count')
    ChannelCount = 0
    Call ChnAlloc ('Single Cycle Count',(cyclemax-cyclemin) + 1, 1, DataTypeFloat64)
    Call ChnAlloc ("pressure min. sample",(cyclemax-cyclemin) + 1, 1, DataTypeFloat64)
    Call ChnAlloc ("Sample pressure Max",(cyclemax-cyclemin) + 1, 1, DataTypeFloat64)
    a = 1
    For cyclecount = cyclemin to cyclemax
    g = 1
    ChannelCount = channelcount + 1
    I = ChnFind ('Ch ()' ' Cycle Count"" "") = "& str (cyclecount)(,a)"
    j = ChnFindReverse ("Ch (" 'Cycle Count) "" ") =" & str (cyclecount), CL ('Cycle Count')) "
    Dial the ChnAlloc ("sample Pressure data retention", (d - i) + 1, 1, DataTypeFloat64 ')
    For k = i j
    ChD (g, "" data keeps the pressure of the sample "") = SMC (k, "Sample pressure")
    g = g + 1
    Next
    Call the ChnCharacter (' "data keeps the pressure of the sample" ")
    ChD (channelcount, ' Single Cycle Count "" ") = cyclecount
    ChD (channelcount, "Max pressure sample") = CMax ("Data Hold sample pressure")
    ChD (channelcount, "pressure min. sample") = CMin ("Data Hold sample pressure")
    Call the ChnDelete (' "data keeps the pressure of the sample" ")
    a = j
    Next

    Can someone please help me find a way to do it quickly? Thank you.

    Hello Steinmeister85

    just in case you are using a newer version of DIAdem, here is an alternative solution.

    Also, I used your example file and it concatenated 50 times to create a file which has about 560,000 values in each channel.

    I run your script from a new one to get a reference number

    Sample file

    Original screenplay: 2.5 seconds

    Optimized script: 0.2 seconds

    50 x example file

    Original screenplay: 111,493 seconds

    Optimized script: 0.25 seconds

    I have to admit that I've sorted the concatenated file. This way I have 216 cycle segments to be analyzed. If I simple concatenate files (without sorting) I get 50 x the number of segments and the new script takes about 9 seconds to execute. The original script doesn't work properly like you woul then have to repeat the cycle count numbers in different areas of the channel...

    I hope that the new versions work for you.

    Andreas

  • What is Server MT Max and min MT serve

    Hi all

    What is MT Max and Min MT servers means in Siebel?
    Why we need to use it. ?
    Please give me an idea on this

    Concerning
    Remy

    Here is an excerpt:

    Our basic recommendation is to have 20 tasks by server of MT. (A server (Multi-Threaded) MT is equivalent to an operating system process).

    Consider the expected number of concurrent users for the application in the application design phase. Although there may be a large number of potential users, a smaller number will be connected at one time. For the purposes of the following discussion, assume that there are 100 to 200 concurrent users.

    There are a lot of variables to consider when you grant an object manager. This development should be discussed with Siebel Expert Services in the Production readiness review. Here are some variables to consider.

    The number of concurrent users.
    The duration of each user spends on the system during a session.
    The session timeout.
    The use of scripts.
    Complexity of the application.
    High usage time. (80% of users are online from 11:00 to 03:00)

    ...

    The parameters used for this component object Siebel Manager are as follows:

    Maximum task = 300
    Maximum MT servers = 15
    Minimum MT servers = 5

    Maximum task represents the total number of concurrent users. Given that the expected number of concurrent users is between 100-200, that the parameter has been set to allow extra room for manoeuvre. This is important in order to allow the sessions which do not disconnect properly and so drag until the session timeout is reached. Session timeout can be set in the Web server and is usually set by default to 20 minutes.

    Maximum MT servers is the total number of processes that can be run for this component. It is also used to calculate how many tasks can be performed on each process. The calculation is as follows:

    Maximum task / Server MT = Maximum number of tasks per MT Server

    300 / 15 = 20

    As mentioned earlier, our basic recommendation is that the maximum task to MT Maximum servers report is 20. A widely configured or scripted application may require a smaller report.
    Minimum server MT is used only when the Siebel server or component is started. This allows to determine how many process starting for this component. The only advantage it gives, it is that it reduces the initialization of the process time when a new MT server is required. In this example, 5 MT servers have been used because 100 users are expected. In this way, the system can handle 100 concurrent users before you have so that it starts a new process.

  • 7054 TDS query max and min measure

    I seem to have difficulty querying for minimum and maximum measurements on my o'scope 7054 TDS. I have two meaurements on and if I question MEASU:MEAS1:TYP? He returned to MAX and back MIN for MEAS2. Yet, when I try to question the real value MEASU:MEAS1:MAX? It returns 99.000 + 36, which of course cannot be true. The strange thing is that the code works for the DPO4104. No idea what I am doing wrong? I have attached 2 sets of code, 1, that's how I activate measures on the scope, the other tries to query for max and min.

    You must use ": MEASU:MEAS %dto?" to get your data (put the number in the %d).  You ask in fact that the max best scope value recorded.  It can keep some statistics on measures.  Here are the commands that I use to get the data (even once, replace %d by the number of measure):

    : %D MEASU:MEAS: DAT?
    : MEASU:MEAS %d: UNI?

    The first order requested the actual data of the measure as well as the second units of measurement.

  • XY Graph-Y-scale visible on the scale of Y corresponding watch still false Max and Min

    Hi guys,.

    I use the XY graph to display the data with 3 Y-scales.

    When I put any scale Y property visibility to False, its display even the Y scale Max and Min range lines in the plot area of the chart and cross line or additional parallel line with other visible scales.

    Attached to the page Ref.

    And I know that the cross-line may be due to different ranges of scales is defining. But the XY graph does not show the scales are invisible and possessions as well.

    Please provide your suggestions to avoid this.

    Scales and lines associated with these scales are separate properties. I've never tried and now I'm not in front of a computer, but should have properties for the definition of the grid line color. Implement transparent.

    Mike...

  • Max and min of the 2d array

    Hello

    can someone show me how to make a max and min of a 2d array

    I am oonly watching colum 0,1,2

    the max of 0,1,2

    the min of 0,1,2

    in my example, it would be 13.612 is max and min 10.059

    I think I must make two loop for, but I have not figured out how.

    Thanks in advance.

    super_saiyans wrote:

    Yes. It can

    but I don't want to look at the column 3,4,5

    Subset of the table allows to remove.

  • the window on my computer does not return to its original size and I can't use the max and min and exit button

    my window is too far to the right and ive tried to get to the original size and it will until a certain point to the left. This leaves me unable to use the max and min and exit tabs

    Hello

    1. What is the brand and model of the computer?

    2. is it a laptop or a desktop computer?

    3. the problem occurs after leaving the game or program?

    4 did you a recent software or changes to the material on the computer?

    Method 1:

    If this happens when you leave a game, I suggest you to follow the steps mentioned in the link and check.

    Open the troubleshooter of display quality

    http://Windows.Microsoft.com/en-us/Windows7/open-the-display-quality-Troubleshooter

    Method 2:

    I also suggest you go through the steps mentioned in the link and the Coachman.

    Change your screen resolution

    http://Windows.Microsoft.com/en-us/Windows7/change-your-screen-resolution

    Method 3:

    Step 1:

    I also suggest you to check if the problem persists in safe mode.

    Start your computer in safe mode

    http://Windows.Microsoft.com/en-us/Windows7/start-your-computer-in-safe-mode

    Step 2:

    You can also check if the problem persists in a clean boot state.

    Clean boot:

    This could happen if one of the substantive programmes is in conflict with the proper functioning of your computer. To help resolve the error and other messages, you can start Windows 7 by using a minimal set of drivers and startup programs. This type of boot is known as a "clean boot". A clean boot helps eliminate software conflicts.

    How to troubleshoot a problem by performing a clean boot in Windows Vista or Windows 7 http://support.microsoft.com/kb/929135

    Note: when you are finished troubleshooting, follow step 7 article to start the computer to a normal startup.

    Hope this helps and keep us posted.

  • Grouping data with dates of Max and Min problem

    Ladies and gentlemen,

    I have a problem that I have tried from different angles. It's probably very easy for some of you, or some of you may have met before, so any help on this is greatly appreciated. I will describe below.

    I have the following data:

    User station site code dstamp ref Qty
    -------- --------- ---------- ------------- --------------------------------------------- ------- -------
    Site_1 user_1 RPT104 Activity_1 16 May 11 13.43.06.566193000 ref_1 1125
    Site_1 user_1 RPT104 Activity_1 16 May 11 13.49.31.364224000 ref_1 1125
    Site_1 user_1 RPT104 Activity_1 16 May 11 13.49.47.413252000 ref_1 1125
    Site_1 user_1 RPT104 Activity_1 16 May 11 13.51.48.906793000 ref_1 1125
    Site_1 user_1 RPT104 Activity_1 16 May 11 13.51.56.947312000 ref_1 1125
    Site_1 user_1 RPT104 Activity_1 16 May 11 13.54.29.396052000 ref_1 1125
    Site_1 user_1 RPT104 Activity_1 16 May 11 13.54.37.444307000 ref_1 1125
    Site_1 user_1 RPT104 Activity_1 16 May 11 13.57.00.237546000 ref_1 1125
    Site_1 user_1 RPT104 Activity_1 16 May 11 13.57.04.285148000 ref_1 1125
    Site_1 user_1 RPT104 Activity_1 16 May 11 13.59.24.745162000 ref_1 1125
    Site_1 user_1 RPT104 Activity_1 16 May 11 13.59.44.774318000 ref_1 1125
    Site_1 user_1 RPT104 Activity_1 16 May 11 14.01.22.434940000 ref_1 1125
    Site_1 user_1 RPT104 Activity_1 16 May 11 14.01.51.291059000 ref_1 1125
    Site_1 user_1 RPT104 Activity_2 16 May 11 14.05.23.572211000 ref_2 1125
    Site_1 user_1 RPT104 Activity_1 16 May 11 14.06.01.058978000 ref_1 1125
    Site_1 user_1 RPT104 Activity_3 16 May 11 14.06.41.341612000 ref_1 1125
    Site_1 user_1 RPT104 Activity_3 16 May 11 14.06.49.375972000 ref_1 1125
    Site_1 user_1 RPT104 Activity_3 16 May 11 14.06.49.388699000 ref_1 1125
    Site_1 user_1 RPT104 Activity_3 16 May 11 14.06.49.401287000 ref_1 1125
    Site_1 user_1 RPT104 Activity_3 16 May 11 14.06.49.413361000 ref_1 1125
    Site_1 user_1 RPT104 Activity_3 16 May 11 14.06.49.425675000 ref_1 1125
    Site_1 user_1 RPT104 Activity_3 16 May 11 14.06.49.437360000 ref_1 1125
    Site_1 user_1 RPT104 Activity_3 16 May 11 14.06.49.449079000 ref_1 1125
    Site_1 user_1 RPT104 Activity_3 16 May 11 14.06.49.460697000 ref_1 1125
    Site_1 user_1 RPT104 Activity_3 16 May 11 14.06.49.472606000 ref_1 1125
    Site_1 user_1 RPT104 Activity_3 16 May 11 14.06.49.484031000 ref_1 1125
    Site_1 user_1 RPT104 Activity_3 16 May 11 14.06.49.495551000 ref_1 1125
    Site_1 user_1 RPT104 Activity_3 16 May 11 14.06.49.513645000 ref_1 1125
    Site_1 user_1 RPT104 Activity_3 16 May 11 14.06.49.530405000 ref_1 1125


    and I'm looking for it in this format:


    Site user station code start end ref Qty
    --------     ---------     ----------     -------------     ---------------------------------------------     ---------------------------------------------          ----------     -------
    Site_1 user_1 RPT104 Activity_1 13.43.06.566193000 16 May 11 May 16, 11 14.05.23.572211000 ref_1 1125
    Site_1 user_1 RPT104 Activity_2 14.05.23.572211000 16 May 11 May 16, 11 14.06.01.058978000 ref_2 1125
    Site_1 user_1 RPT104 Activity_1 14.06.01.058978000 16 May 11 May 16, 11 14.06.41.341612000 ref_1 1125
    Site_1 user_1 RPT104 Activity_3 14.06.41.341612000 16 May 11 (May 16, 11 14.06.49.530405000 + 4secs ref_1 1125)
    either may 16, 11 14.06.53.530405000)


    I can get the hours start and end without problem using data intial twice and it compensation by a rownum is but using the functions max and min based on the data that I get:

    Site user station code start end ref Qty
    --------     ---------     ----------     -------------     ---------------------------------------------     ---------------------------------------------          ----------     -------
    Site_1 user_1 RPT104 Activity_1 16 May 11 13.43.06.566193000 * May 16, 11 14.06.41.341612000 * ref_1 1125
    Site_1 user_1 RPT104 Activity_2 14.05.23.572211000 16 May 11 May 16, 11 14.06.01.058978000 ref_2 1125
    Site_1 user_1 RPT104 Activity_3 * 14.06.41.341612000 * 16 May 11 (May 16, 11 14.06.49.530405000 + 4secs ref_1 1125)
    either may 16, 11 14.06.53.530405000)

    who is missing on the 3rd line of the previous dataset (if everything goes well in fat after validation) and assigns the wrong time end.

    I think the solution may have soemthing to do using the function dense_rank() (any ORDER by code, start) but I'm not too familiar with it and I think that the facts in the Start column data is unique it affects its functioning.

    If anyone can offer any help or point me in the right direction I'll offer eternal grace and rest a drink we should never meet!

    see you soon

    Published by: MickyMick on June 7, 2011 03:21

    BobLilly wrote:
    Tabibitosan of Aketi method can be applied here (see {: identifier of the thread = 1005478})

    Site_1 user_1 RPT104 Activity_1 2011-05-16 13.43.06.566193000 2011-05-16 14.05.23.572211000 ref_1 1125
    Site_1 user_1 RPT104 Activity_2 2011-05-16 14.05.23.572211000 2011-05-16 14.06.01.058978000 ref_2 1125
    Site_1 user_1 RPT104 Activity_1 2011-05-16 14.06.01.058978000 2011-05-16 14.06.41.341612000 ref_1 1125
    Site_1 RPT104 Activity_3 2011-05-16 14.06.41.341612000 user_1 ref_1 14.06.45.341612000 2011-05-16 1125

    According to OP we may 16, 11 14.06.49.530405000 + 4secs. In any case, use method start_of_group:

    With t as (
    Select 'Site_1' as Site, 'user_1' as Usr, 'RPT104' as Station, 'Activity_1' as Code
    , to_timestamp('16-MAY-11 13.43.06.566193000', 'DD-MON-RR HH24:MI:SS.FF') as DTStamp, 'ref_1' as Ref, 1125 as Qty from dual union all
    Select 'Site_1' as Site, 'user_1' as Usr, 'RPT104' as Station, 'Activity_1' as Code
    , to_timestamp('16-MAY-11 13.49.31.364224000', 'DD-MON-RR HH24:MI:SS.FF') as DTStamp, 'ref_1' as Ref, 1125 as Qty from dual union all
    Select 'Site_1' as Site, 'user_1' as Usr, 'RPT104' as Station, 'Activity_1' as Code
    , to_timestamp('16-MAY-11 13.49.47.413252000', 'DD-MON-RR HH24:MI:SS.FF') as DTStamp, 'ref_1' as Ref, 1125 as Qty from dual union all
    Select 'Site_1' as Site, 'user_1' as Usr, 'RPT104' as Station, 'Activity_1' as Code
    , to_timestamp('16-MAY-11 13.51.48.906793000', 'DD-MON-RR HH24:MI:SS.FF') as DTStamp, 'ref_1' as Ref, 1125 as Qty from dual union all
    Select 'Site_1' as Site, 'user_1' as Usr, 'RPT104' as Station, 'Activity_1' as Code
    , to_timestamp('16-MAY-11 13.51.56.947312000', 'DD-MON-RR HH24:MI:SS.FF') as DTStamp, 'ref_1' as Ref, 1125 as Qty from dual union all
    Select 'Site_1' as Site, 'user_1' as Usr, 'RPT104' as Station, 'Activity_1' as Code
    , to_timestamp('16-MAY-11 13.54.29.396052000', 'DD-MON-RR HH24:MI:SS.FF') as DTStamp, 'ref_1' as Ref, 1125 as Qty from dual union all
    Select 'Site_1' as Site, 'user_1' as Usr, 'RPT104' as Station, 'Activity_1' as Code
    , to_timestamp('16-MAY-11 13.54.37.444307000', 'DD-MON-RR HH24:MI:SS.FF') as DTStamp, 'ref_1' as Ref, 1125 as Qty from dual union all
    Select 'Site_1' as Site, 'user_1' as Usr, 'RPT104' as Station, 'Activity_1' as Code
    , to_timestamp('16-MAY-11 13.57.00.237546000', 'DD-MON-RR HH24:MI:SS.FF') as DTStamp, 'ref_1' as Ref, 1125 as Qty from dual union all
    Select 'Site_1' as Site, 'user_1' as Usr, 'RPT104' as Station, 'Activity_1' as Code
    , to_timestamp('16-MAY-11 13.57.04.285148000', 'DD-MON-RR HH24:MI:SS.FF') as DTStamp, 'ref_1' as Ref, 1125 as Qty from dual union all
    Select 'Site_1' as Site, 'user_1' as Usr, 'RPT104' as Station, 'Activity_1' as Code
    , to_timestamp('16-MAY-11 13.59.24.745162000', 'DD-MON-RR HH24:MI:SS.FF') as DTStamp, 'ref_1' as Ref, 1125 as Qty from dual union all
    Select 'Site_1' as Site, 'user_1' as Usr, 'RPT104' as Station, 'Activity_1' as Code
    , to_timestamp('16-MAY-11 13.59.44.774318000', 'DD-MON-RR HH24:MI:SS.FF') as DTStamp, 'ref_1' as Ref, 1125 as Qty from dual union all
    Select 'Site_1' as Site, 'user_1' as Usr, 'RPT104' as Station, 'Activity_1' as Code
    , to_timestamp('16-MAY-11 14.01.22.434940000', 'DD-MON-RR HH24:MI:SS.FF') as DTStamp, 'ref_1' as Ref, 1125 as Qty from dual union all
    Select 'Site_1' as Site, 'user_1' as Usr, 'RPT104' as Station, 'Activity_1' as Code
    , to_timestamp('16-MAY-11 14.01.51.291059000', 'DD-MON-RR HH24:MI:SS.FF') as DTStamp, 'ref_1' as Ref, 1125 as Qty from dual union all
    Select 'Site_1' as Site, 'user_1' as Usr, 'RPT104' as Station, 'Activity_2' as Code
    , to_timestamp('16-MAY-11 14.05.23.572211000', 'DD-MON-RR HH24:MI:SS.FF') as DTStamp, 'ref_2' as Ref, 1125 as Qty from dual union all
    Select 'Site_1' as Site, 'user_1' as Usr, 'RPT104' as Station, 'Activity_1' as Code
    , to_timestamp('16-MAY-11 14.06.01.058978000', 'DD-MON-RR HH24:MI:SS.FF') as DTStamp, 'ref_1' as Ref, 1125 as Qty from dual union all
    Select 'Site_1' as Site, 'user_1' as Usr, 'RPT104' as Station, 'Activity_3' as Code
    , to_timestamp('16-MAY-11 14.06.41.341612000', 'DD-MON-RR HH24:MI:SS.FF') as DTStamp, 'ref_1' as Ref, 1125 as Qty from dual union all
    Select 'Site_1' as Site, 'user_1' as Usr, 'RPT104' as Station, 'Activity_3' as Code
    , to_timestamp('16-MAY-11 14.06.49.375972000', 'DD-MON-RR HH24:MI:SS.FF') as DTStamp, 'ref_1' as Ref, 1125 as Qty from dual union all
    Select 'Site_1' as Site, 'user_1' as Usr, 'RPT104' as Station, 'Activity_3' as Code
    , to_timestamp('16-MAY-11 14.06.49.388699000', 'DD-MON-RR HH24:MI:SS.FF') as DTStamp, 'ref_1' as Ref, 1125 as Qty from dual union all
    Select 'Site_1' as Site, 'user_1' as Usr, 'RPT104' as Station, 'Activity_3' as Code
    , to_timestamp('16-MAY-11 14.06.49.401287000', 'DD-MON-RR HH24:MI:SS.FF') as DTStamp, 'ref_1' as Ref, 1125 as Qty from dual union all
    Select 'Site_1' as Site, 'user_1' as Usr, 'RPT104' as Station, 'Activity_3' as Code
    , to_timestamp('16-MAY-11 14.06.49.413361000', 'DD-MON-RR HH24:MI:SS.FF') as DTStamp, 'ref_1' as Ref, 1125 as Qty from dual union all
    Select 'Site_1' as Site, 'user_1' as Usr, 'RPT104' as Station, 'Activity_3' as Code
    , to_timestamp('16-MAY-11 14.06.49.425675000', 'DD-MON-RR HH24:MI:SS.FF') as DTStamp, 'ref_1' as Ref, 1125 as Qty from dual union all
    Select 'Site_1' as Site, 'user_1' as Usr, 'RPT104' as Station, 'Activity_3' as Code
    , to_timestamp('16-MAY-11 14.06.49.437360000', 'DD-MON-RR HH24:MI:SS.FF') as DTStamp, 'ref_1' as Ref, 1125 as Qty from dual union all
    Select 'Site_1' as Site, 'user_1' as Usr, 'RPT104' as Station, 'Activity_3' as Code
    , to_timestamp('16-MAY-11 14.06.49.449079000', 'DD-MON-RR HH24:MI:SS.FF') as DTStamp, 'ref_1' as Ref, 1125 as Qty from dual union all
    Select 'Site_1' as Site, 'user_1' as Usr, 'RPT104' as Station, 'Activity_3' as Code
    , to_timestamp('16-MAY-11 14.06.49.460697000', 'DD-MON-RR HH24:MI:SS.FF') as DTStamp, 'ref_1' as Ref, 1125 as Qty from dual union all
    Select 'Site_1' as Site, 'user_1' as Usr, 'RPT104' as Station, 'Activity_3' as Code
    , to_timestamp('16-MAY-11 14.06.49.472606000', 'DD-MON-RR HH24:MI:SS.FF') as DTStamp, 'ref_1' as Ref, 1125 as Qty from dual union all
    Select 'Site_1' as Site, 'user_1' as Usr, 'RPT104' as Station, 'Activity_3' as Code
    , to_timestamp('16-MAY-11 14.06.49.484031000', 'DD-MON-RR HH24:MI:SS.FF') as DTStamp, 'ref_1' as Ref, 1125 as Qty from dual union all
    Select 'Site_1' as Site, 'user_1' as Usr, 'RPT104' as Station, 'Activity_3' as Code
    , to_timestamp('16-MAY-11 14.06.49.495551000', 'DD-MON-RR HH24:MI:SS.FF') as DTStamp, 'ref_1' as Ref, 1125 as Qty from dual union all
    Select 'Site_1' as Site, 'user_1' as Usr, 'RPT104' as Station, 'Activity_3' as Code
    , to_timestamp('16-MAY-11 14.06.49.513645000', 'DD-MON-RR HH24:MI:SS.FF') as DTStamp, 'ref_1' as Ref, 1125 as Qty from dual union all
    Select 'Site_1' as Site, 'user_1' as Usr, 'RPT104' as Station, 'Activity_3' as Code
    , to_timestamp('16-MAY-11 14.06.49.530405000', 'DD-MON-RR HH24:MI:SS.FF') as DTStamp, 'ref_1' as Ref, 1125 as Qty from dual
    ),
    t1 as (
           select  t.*,
                   lead(DTStamp,1,DTStamp + interval '4' second) over(order by DTStamp) ENDTS,
                   case
                     when     lag(Site) over(order by DTStamp)  = Site
                          and
                              lag(Usr) over(order by DTStamp)  = Usr
                          and
                              lag(Station) over(order by DTStamp)  = Station
                          and
                              lag(Code) over(order by DTStamp)  = Code
                          and
                              lag(Ref) over(order by DTStamp)  = Ref
                          and
                              lag(Qty) over(order by DTStamp)  = Qty
                       then 0
                     else 1
                   end start_of_group
             from  t
          ),
    t2 as (
           select  t1.*,
                   sum(start_of_group) over(order by DTStamp) grp
             from  t1
          )
    select  Site,
            Usr,
            Station,
            Code,
            min(DTStamp) STARTTS,
            max(ENDTS) ENDTS,
            Ref,
            Qty
      from  t2
      group by grp,
               Site,
               Usr,
               Station,
               Code,
               Ref,
               Qty
      order by STARTTS
    /
    
    SITE   USR    STATIO CODE       STARTTS                             ENDTS                               REF          QTY
    ------ ------ ------ ---------- ----------------------------------- ----------------------------------- ----- ----------
    Site_1 user_1 RPT104 Activity_1 16-MAY-11 01.43.06.566193000 PM     16-MAY-11 02.05.23.572211000 PM     ref_1       1125
    Site_1 user_1 RPT104 Activity_2 16-MAY-11 02.05.23.572211000 PM     16-MAY-11 02.06.01.058978000 PM     ref_2       1125
    Site_1 user_1 RPT104 Activity_1 16-MAY-11 02.06.01.058978000 PM     16-MAY-11 02.06.41.341612000 PM     ref_1       1125
    Site_1 user_1 RPT104 Activity_3 16-MAY-11 02.06.41.341612000 PM     16-MAY-11 02.06.53.530405000 PM     ref_1       1125
    
    SQL> 
    

    SY.

  • in the header problem report the actual display Max and Min...

    Hi guys,.

    I have the following problem.

    1. I have a multi selection prompt where you take 2 years.

    2. I have the following columns. Year, month, Exp, calc YEAR (max), calc (min)

    3. I need to get the months max and min across all lines. So far, I tried MAX, MIN, RMAX and RMIN without success. However, it is not picking up along all lines. For example,.

    2001 1 100050 2001 2001
    .....
    2002 1 244005 2002 2002

    I'm sure it has to do something with my aggregation in the computed column, but not quite sure where exactly.

    c max (max (year)) and min (min (year))

    :)

  • date wise-value Max and min

    I have Table with columns of test


    name value values_date
    -----------------------------
    A 40 01/08/2010
    A 10 02/08/2010
    A 10 03/08/2010
    A 10 08-04-2010
    A 20 03/08/2010
    A 50 02/08/2010
    A 50 03/08/2010
    A 50 04/08/2010

    B 100 01/08/2010
    B 10 02/08/2010
    B 20 03/08/2010
    B 10 08-01-2010
    B 100 11/08/2010
    B 100 12/08/2010
    B 100 13/08/2010


    Insert into test values('A','40','1/8/2010');
    Insert into test values('A','10','2/8/2010');
    Insert into test values('A','10','3/8/2010');
    Insert into test values('A','10','4/8/2010');
    Insert into test values('A','20','3/8/2010');
    Insert into test values('A','50','2/8/2010');
    Insert into test values('A','50','3/8/2010');
    Insert into test values('A','50','4/8/2010');
    Insert into test values('B','100','1/8/2010');
    Insert into test values('B','10','2/8/2010');
    Insert into test values('B','20','3/8/2010');
    Insert into test values('B','10','1/8/2010');
    Insert into test values('B','100','11/8/2010');
    Insert into test values('B','100','12/8/2010');
    Insert into test values('B','100','13/08/2010');


    I like OP

    name min_value max_value max_value_date min_value_date
    -------------------------------------------------------------------------
    A 50 04/08/2010 10 02/08/2010
    B 10 01/08/2010 100 13/08/2010

    Hello...

    Try saying,.

     SQL> SELECT A.NAME,A.VALUE,MIN(A.V_DATE),B.VALUE,MAX(B.V_DATE)FROM TEST A,TEST B WHERE
      2  (A.NAME,A.VALUE) IN (SELECT NAME,MIN(VALUE) FROM TEST GROUP BY NAME) AND
      3  (A.NAME,B.VALUE) IN (SELECT NAME,MAX(VALUE) FROM TEST GROUP BY NAME) GROUP BY A.NAME,A.VALUE,B.VALUE;
    
    NAME            VALUE MIN(A.V_DATE)        VALUE MAX(B.V_DATE)
    ---------- ---------- --------------- ---------- ---------------
    A                  10 2/8/2010                50 4/8/2010
    B                  10 1/8/2010               100 13/08/2010
    

    Kind regards
    Santosh.Minupurey

  • AVG, max and min calculated from form data

    I have two tables. One with the raw data and the other with summary data. There is a form which the raw data to column came in, and then click submit, I use a cfloop function to get the data in the same column in the table of raw data. I can't find an easy way to calculate the max, min and average values for the data that are in the raw data table that can be put in the summary data table. The data are customized according to the date and place.

    This is the code to get the raw data into the table.

    < CFLOOP INDEX = "onerow" FROM = "1" TO = "#form.numrows #" >
    < CFQUERY NAME = "insertrawdata" DATASOURCE = 'test' >
    INSERT INTO test.dbo.rawdata (locationid, date, data)
    VALUES (' #form.locaitonid # ', #DateValue #, ' #Form ['data' & onerow] #")
    < / CFQUERY >
    < / CFLOOP >

    OK, well, do it in 2 queries then...


    Select max (data) as max, min (data) as min, avg (data) like avg test.dbo.rawdata where locationid = ' #form.locationid # ' and date = #datevalue # group by locationid, date


    insert into test.dbo.summarydata (locationid, date, max, min, avg)
    values (' #form.locationid #', #datevalue #,)
    (#getSummaryData.max #, #getSummaryData.min #, #getSummaryData.avg #)

  • scanning question (Min, Max and Min return)

    I have a tunable laser that is supposed to make a sweep of the Min to Max and then back to min.

    For some reason, it seems to be an additional step after the peak wavelength as shown below.

    Strange is that it seems to happen only when I put a wavelength that has 1 decimal place or 4 decimals.

    I'm relatively new to labVIEW, Please HELP? any advice would be helpful.

    This looks like a problem of accuracy point.  Each language beats in it.

    What you need to do is to calculate how many steps to the top must be made and then make comparisons on the step number (an integer).

    Also, why use the node formula?  A structure matter would take care of the logic.

Maybe you are looking for