Best way to do analysis of data

I have 18,000 or so records, each marked with a date field, and each recording the elapsed time it took to perform some action, in seconds, as of a particular hour/minute/second.
For example:
TESTTIME         TESTDURATION
7:03:21          2.4
7:03:32          3.1
7:04:01          1.9...and so on for a long time!
I would like to produce a report which says 'in this 5 (or 10 or 15) minute interval, the average time taken to perform the task was X seconds', and to project that out over the entire duration of the test, so that a series of 5 minute (say) averages is produced covering the whole test period.
So far, I have got this:
select
count(*), avg(testduration) from testtable
where testtime>=(select min(testtime) from testtable)
and testtime<=(select min(testtime) from testtable)+5/1440
...and it works, but of course it will only output one average for one time period and to get the next one, I have to re-type quite a lot of the subqueries.
So then I put it all in a PL/SQL loop, but that seems inefficient, especially because I bet there is some sort of analytical function that could do it all in one pass in plain SQL.
Sadly I don't have a clue about analytical functions, so if someone here does and doesn't mind offering a clue, I'd be very grateful.
Of course, if it turns out some other way entirely will produce the desired result, I'd be keen to see that too.

I think you've missed the essential point: that there are (or I think there are) SQL constructs which will produce the report I want in one pass.
Analytical functions, I think they're called. But I don't know which would do it, and I wouldn't have the first idea how to use it.
Besides, the one pass feature (that is, one SQL statement, not repeated re-issues of the same statement with modified WHERE clauses) is another important point that fiddling with truncated dates and substr constructs won't deal with, either, I think.
I've done it in a PL/SQL loop which forever increments the start and end times for the sample (and like, I do have a clue about AVG and SUM). I'd like to know how to do it more efficiently in a single SQL statement.

Similar Messages

  • What is the best way to kill/stop a data load?

    Hi.
    What is the best way to kill/stop a data load?
    I have a data load from my QA R/3 system that is extracting 115.000.000+ records. The problem is that the selection in the function module used in the data source does not work, and the problem was not detected because of the nature of the data on the development system.
    I could kill processes owned by my background user (on both R/3 and BW) but I risk killing other loads, and sometimes the job seems to restart if I just try to kill processes. If I remove transactional RFCs in SM58 the load does not terminate; I only skip one or more datapackages. I have also tried to change the QM-status in the monitor to red, but that does not stop the load either...
    So isn't there a nice fool-proof way of stopping a dataload?
    Best regards,
    Christian Frier

    Hi,
    There r 2 ways to kill the job.
    One is using transation RSMO locate the job and display the status tab double click on the yellow light that is shown on the line total, a pop will come 'set overall status ' is displayed select the desired status that is red and save it. Then return to the monitor page and select the header tab double ckick on the data target right click and then goto 'manage',there should be request sitting there probably with yellow lights , highlight the line with the faulty request click the delete button then click refresh button.
    Second is goto SM37 and click on the active selection and enter the jobname and then click excute the particulr job should appear highlight the jobname then click on the stop iconthat appears on the taskbar( 3 rd from left)
    hope it is clear.
    Regards-
    Siddhu

  • Best way to  back up your data

    Which is the fastest and best way to back up your data in case of any problem ? Still to transfer to an external HD ?
    Thanks

    Hi Ferro;
    Best and simplest way to back up is Time Machine to an external drive.
    I think that any backup plan should alway be to an external drive. If you backup to an internal drive and the Mac fails, what good is your backup then?
    Allan

  • Best way to transfer internal HD data in Mavericks to Mac with Yosemite ?

    Hello,
    I'm using a 2007 iMac with Mavericks and will be getting a new one which will presumably come with Yosemite installed. What's the best way to transfer all the data from my internal HD on the old system, to the new one ?
    I use SuperDuper to make backups to external HD's, so if I make a bootable copy of the mac HD to an ext HD using SuperDuper, will everything function fine despite the different OS's ?
    Thanks,
    Matrose.

    You can make a bootable copy of your system now, but you won't be able to boot from it with the new computer. They are not usually backwards compatible with the OS. But when you first boot into the new system, use SetUp Assistant to migrate the data from the cloned copy. That will work just fine.

  • What is the Best way To Copy and paste data from 1 book to another

     I have 18 sheets in 5 different books that I want to extract data from specific cells.  What is the best way to do this?  Example:  1 sheet is called Numbers E-O1 data in 13:WXYZ. The data updates and moves up 1 row every time I enter
    a new number. So let's say I enter the number 12. Through a lot of calculations the output goes in 13:WXYZ. To what I call a counter which is a 4 digit number.  Anyways, how can I send that 4 digit number to a totally different sheet?  To bullet
    what I'm talking about
    data in cells Row 13:WXYZ in book called Numbers sheet E-O1
    send data to book called "Vortex Numbers" Sheet E-O row 2001:CDEF
    What formula or Macro can I use to make this work?
    thank you!

    Hello Larbec,
    Syntax:
    '[BookName]SheetName'!Range
    Enter in cell  2001:CDEF:
    ='[Numbers]E-O1'!13:WXYZ
    This assumes that the file is open in Excel. Otherwise you need to add the path:
    'ThePath[BookName]SheetName'!Range
    Best regards George

  • What is the best way to stack DAQ aquired data in labview?

    I'm developing an application to work with an M-series daq card and labview 8.5 to output a signal and then record on 8 differential inputs for a short period of time (~10 ms). I need to stack my data, however, because the incoming signal will be very, very small, even after amplification. So basically i'm running a slightly modified version of the multifunction Synch AI-AO.vi (included with the install of daqmx). What is the best way for me to rerun this vi a set number of times and add new data directly to the old data (not cat-ing or anything, like |sample 1 of run 1| + |sample 1 of run 2| = stacked stample 1).
    A slightly modified version of the mutlifunction synch AI-AO.vi is attached.
    Attachments:
    des_v2_Multi-Function-Synch AI-AO.vi ‏143 KB

    Hi LSU,
    see attachment on how to "stack" several measurements. I simply add the waveforms and use a shift register to keep the last iterations value.
    Writing to files in each iteration is extremly CPU consuming - especially with express vis. Using for loops for just one iteration is "senseless". You could enable the conditional terminal of the for loop to realize your stop feature.
    For your message 4:
    Have you ever tried all the things you asked for? Sometimes it's easiest to just try&error
    And for the "n=n+x" question: It really helps to take the free online courses offered by NI!
    Message Edited by GerdW on 11-11-2009 06:27 PM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    des_v2_Multi-Function-Synch AI-AO.vi ‏128 KB

  • Best way to restore game app data to iPad after rebuild

    I rebuilt my UMBP over the weekend. Before doing so I took a copy of my documents, movies etc, and the entire iTunes library folder and placed it onto an external HDD. This was not a Time Machine backup, but a straight copy. After rebuilding, reinstalled latest iTunes and copied just the songs back across and re-authorized the library. I didn't copy the entire folder into the new place, but I still have all the items.
    When I went to connect the wifes iPad for sync, it begins the whole "new device" process and must be "erased to sync." Problem with this is she has one or two apps on there with significant game data (Bejeweled for instance) that she doesn't want to loose.
    Any advice on best way to resolve this, i.e. able to connect the iPad and sync to rebuilt machine without losing the data? Can I obtain the old backup(s) from the folder and use that or am I better just copying the entire folder across from the external drive onto the rebuilt machine. I did have a search and while there is plenty of backup / restore advice, nothing seems to match my situation 100%.
    Thanks in advance.
    Message was edited by: MalMcA - Spelling correction

    Try to backup manually. Disable autosync in iTunes, connect your device, right click on it in the device list and choose backup. This will copy all settings, photos and 3rd party data including your game settings to iTunes. Do the same thing to transfer your purchases to be sure to have the latest apps and media copied over.
    Set up at least one contact and event on the computer, so that calendars and contacts are being merged during the first sync.
    Since all data will be erased during this first sync, use this backup to restore your settings afterwards.
    See what's stored in the backup here: http://support.apple.com/kb/HT1766
    Restoring: http://support.apple.com/kb/HT1414

  • Best way to manage global application data

    Hello,
    I'm looking for the best way to manage my global application data. I have a program containing about 70 application settings which are loaded from an ini file and organised as clusters and loose variables. I want to be able to use these settings across multiple vi's. The application settings can be modified during execution. Some vi's can change settings and these changes need to be visible accros all vi's.
    What is the best way to manage this. Ideally, I would have one cluster or class containing all the application settings but since the sub vi's run independend, I can't wire them through. 
    From what I've read so far, global variables ain't really well suited for this due to race conditions. The FGV might be a solution but it is not clear to me how to implement this for many variables. (One FGV or multiple FGV's, etc... Does anyone have a good example of this?)
    Are there any other good solutions? Any advice is welcome!
    Best regards,
    Wouter

    You can also create a singleton LVOOP object (maybe a few if you want to logically organize your settings). When you initialize the system you create the object and it uses a DVR internally to store your data. Since this is a singleton object you do not need to wire it through your code. Your subVIs simply call the appropriate methods and it will interact with the class data. A FGV is basically the same thing except that you only have a single VI so you are more limited with your inputs and outputs. A singleton object let's you refine the connector pains based on the methods and what they are doing.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • What's the best way to handle all my data?

    I have a black box system that connects directly to a PC and sends 60 words of data at 10Hz (worse case scenario). The black box continuously transmits these words, which contain a large amount of data that is continuously updated from up to 50 participants (again worst case scenario) 
    i.e. 60words * 16bits * 10Hz * 50participants = 480Kbps.  All of this is via a UDP Ethernet connection.
    I have LabVIEW reading the data without any problem. I now want to manipulate this data and then distribute it to other PCs on a network via TCP/IP.
    My question is what is the best way of storing my data locally on the interface PC so that I can then have clients request the information they require via TCP/IP. Each message that comes in via the Ethernet will relate to one of the participants, so I need to be able to check if I already have data about that participant - if I do then I can just update it, if I don't I need to create a record for the participant, and if I havn't heard from one for a while I will need to delete it. I don't want to create unnecessary network traffic. I also want to avoid global variables if possible - especially considering that I may have up to 3000 variables to play with.
    I'm not after a solution, just some ideas about how to tackle this problem... I thought I could perhaps create a database and have labview update a table with the data, adding a record for each participant. Alternatively is there a better way of storing all the data in memory besides global variables?
    Thanks in advance.

    Hi russelldav,
    one note on your data handling:
    When  each of the 50 participants send the same 60 "words" you don't need 3000 global variables to store them!
    You can reorganize those data into a cluster for each participant, and using an array of cluster to keep all the data in one "block".
    You can initialize this array at the start of the program for the max number of participants, no need to (dynamically) add or delete elements from this array...
    Edited:
    When all "words" have the same representation (I16 ?) you can make a 2D array instead of an array of cluster...
    Message Edited by GerdW on 10-26-2007 03:51 PM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Best way to transfer XML based data

    All,
    I am looking for the best possible way of transferring XML based data from a server to a web based client.
    XML file is generated on server and its size is massive. I am looking for all possible alternatives and possibly the best way.
    Could it be AJAX, SOAP, parsing through a servlet, creating value objects?
    I appreciate all inputs.
    Thanks,
    S.

    You can make a bootable copy of your system now, but you won't be able to boot from it with the new computer. They are not usually backwards compatible with the OS. But when you first boot into the new system, use SetUp Assistant to migrate the data from the cloned copy. That will work just fine.

  • Best way to show movie release date by year under "Movies" section

    I am a proud owner of a new 2nd gen Apple TV. It does everything I hoped. I am using IDentity 2 to capture the movie Metadata and import into a new m4v file. All data is trnsferred into iTunes. The question: What is the best way to have the release year show in Apple TV? I currently have a description, actor, director, time, etc showing. The Metadata is taken from IMDB, so the release date is listed in the video description when I "get info" in iTunes. As you can imagine, I don't want to manually input the release year in every movie file name. Any suggestions?

    No asnswer. I can't find an answer on the web either. How many more years till Apple fixes this?

  • Best way to show the following data?

    Hi Experts,
    I am designing a validation solution in java webdynpro.
    I need to process 1000 records against certain logic and need to show the errors in the interface..Each record has more than 30 columns. I would like to get your suggestions on,
    1. How to display 1000 records with nearly 30 columns? A normal table with scrolling is enough or i need to split into 2 or 3 tabs based on some grouping and show these 1000 records?
    2. What would be the best way to show the error messages on these records?, Is it advisable to show the error messages on a tooltip? Is it possible to show a tooltip for each record in a table?
    Any suggestions would be really helpful for my work...
    Thanks in advance..
    Regards,
    Senthil
    Edited by: Senthilkumar.Paulchamy on Jun 23, 2011 9:18 PM

    Hi,
    Depending on your data would use a TableColumnGroup to group your 30 columns under a common header (displaying only the most significant data)
    Expanding the row would then show all 30 columns' data
    To display the errors, I would display the common header rows in bold red to make them stand out from the non-erroneous rows.
    Furthermore, I would add a toggle button, to alternate between 'all records' and 'erroneous records only'
    Best,
    Robin

  • What's the best way to load FieldPoint measurement data into PI System?

    I am finding the best way to load data collected by NI Field Point (FP2220) into the PI system of our power plant.
    I found pieces of information about FieldPoint OPC server in NI.com. Not sure if it comes with Field Point Hardware, sold by NI as a separate product or it is actually non-standard NI products. Anyway, I know that there exists a thing called FieldPoint OPC server.
    The PI system I mentioned has a OPC client software called PI-OPC interface. It is able to communicate with standard OPC DA server. If that FieldPoint OPC server is a standard OPC DA server provide data collected by Field Point complying to OPC standard, than that's perfect.
    Anyone familar with PI system and NI product, please help if the above is going to work or if there is a better way to put Fieldpoint data into PI.

    Hi Eric,
    This information really helpful, thanks. Regarding to the NI OPC server for NI FieldPoint, I have the other query.
    In my setup, there are two sets of FieldPoint located in two different locations on my ethernet network. They are going to be controlled by a single PC. If I am going to connect both my FieldPoint sets with OPC standard, how many NI OPC server for FieldPoint do I need to connect to? Are there two NI OPC servers each serves one FieldPoint set? Or there is only NI OPC server which serves both FieldPoint sets?
    I am concerning about the number of NI OPC server instances running, because the number of OPC client license I need to purchase depends on how many OPC server I need to connect to. If one NI OPC server serves both my FieldPoint sets, I only need to buy one OPC client license; otherwise, I need to purchase two. In the future, I am going to have another two sets of FieldPoint sets, so the answer of my query determines how many OPC clients I need to purchase eventually - One or four. A huge price difference.
    Looking forward to your reply.
    Regards,
    Roger

  • Best way to do an Excel data file load

    Hi
    I need to load Excel file’s data into an ORACLE table (on a frequent basis). While loading it, I need to validate each column's contents (using PL SQL code). Are there any packages/procs/APIs provided by ORACLE to do this kind of activity? What would be the best way to do an Excel file load within ORACLE ? FYI, I have Visual Basic code that reads data from Excel file and loads it into a temporary ORACLE table, then I validate data in this temporary table using a PL-SQL code in stored procedure. I am trying to avoid the "front end" process of this effort in VB and want to do the whole thing within ORACLE itself. Please let me know if you have any ideas.
    Your help is greatly appreciated!!
    Thanks in advance,
    Ram

    If you are running on Windows, you could try COM Automation which means moving your VB process into a stored procedure. I've never tried this myself, having been quite satisfied with Heterogeneous Connectivity.
    Tak

  • The best way to move 2TB of data from Win to Mac

    Hello,
    what is the best way me to move 2TB (multiple files) data from windows to Mac?
    I think that over the LAN, even using crossover cable connecting 1GB NICs would be painfully long. (Windows disk is quite fragmented)
    If I put windows (ntfs partitioned) disc to one of Mac Pro bays, will Mac allows me to access the date on it?
    if I take the disk of the windows PC and put it to [eSATA Hard Drive docking solution|http://eshop.macsales.com/item/Newer%20Technology/FWU2ES2HDK>, will Mac be able to mount it and let me copy the files from the windows disk?
    Any other ways of moving 2TB data from windows to Mac?

    Being able to read, also means, being able to mount said drive volumes.
    Windows 7 64-bit (Pro version if you have dual processor, which at this time really isn't needed that much) would work fine too.
    There are programs, some or most have their own limitations, allow Windows to read and write to Mac HFS+ file system volumes; or the reverse and allow Mac OS to read/write NTFS. None are what I call perfect.
    Becuase of limitations in older file systems and partitioning, Apple and Microsoft have implemented support for volumes larger than 2TB with GPT to replace aging Master Boot Record (Windows 7 even can't run off MBR with volumes larger than 1.9TB). Mac Pro uses GPT and can boot from very large volumes.
    eSATA docking stations. Depends on the interface and controller card if any, whether using SATA PCIe for one thing (you would not ever want to use USB though maybe USB3 PCIe if you can find one), therefore, use internal drive bays. Also, more concern with the drive temperature in one, they can get very warm in my experience.
    But maybe you do, maybe you don't, actually need to move data, maybe just have it read-only accessible.
    Putting the drive in a FW800 case would probably make the most sense, both now and for further use for booting (backup clones are handy and allowed) or for backup with Mac TimeMachine.
    But I would install Windows 7 on your Mac Pro. I use GPT for data drives in Windows and to read from in Mac OS environment.

Maybe you are looking for

  • Best practice for printing

    After upgrade CR2008 -> CR2011 I have recognized problem with some reports (hang up of rendering Viewer control). Reason seems to page setting for printing ? What is best practice ? Use No printer option ? Regards miroslav

  • UTF-8 support in Web AS Java 6.40

    Hi, All, Our web application running on Web AS 6.40 with SQL Server 2000 needs to support multiple languages. We create the tables with column type NVARCHAR, set encoding scheme to UTF-8 for JDBC driver, add '<%@ page language="java" contentType="tex

  • Keywords and Metatags

    I want to put keywords and Meta tags with my website.  Do I put that in html or am I meant to sort that out through my server?  I want to help search engines find my site. thanks, D www.meashu.com

  • IPhone 4 - Contact sync with Gmail

    How do I sync all contacts from my iPhone 4 to Gmail? All contacts that I add directly to my iPhone that do not update to Gmail automatically. These contacts fall into a folder called "All on My iPhone". Please provide any insight possible. Thannks.

  • Showing a video with the new effects applied

    Hey there I´ve made a colored project using DaVinci Resolve and now i´m trying to insert the before and after videos onto my showreel using a curtain like effect that starts with the before video and then opens the after video with the effetcs applie