results of the last 6 periods of 30 minutes

Hello

I have a question and I need returns the results of the last 6 rounds of 30 minutes.like that:

If it is now 13:15, results from 11:00 to 13:30

If it is now 13:35, results from 11:30 to 14:00

If it is now 13:59, results from 11:30 to 14:00

can someone help me please?

I found this surfing but I couldn't change it to do what I need.

Select sysdate,

trunc (sysdate, 'mi') - truncated to the nearest minute

NUMTODSINTERVAL (-convert the minute interval type number and subtract.)

MOD (to_char (sysdate, 'mi'), 15), - find the minutes from the nearest

"minute".

) as nearest_quarter

Double;

Or...

SQL > SELECT SYSDATE now, N30min - (180 / 1440) from_time, N30min to_time

2 FROM (SELECT TRUNC (SYSDATE, 'HH')

3 + NUMTODSINTERVAL (CEIL (TO_CHAR (SYSDATE, 'MI') / 30) * 30 'minute')

4 AS N30min

5 * DOUBLE)

SQL > /.

NOW FROM_TIME TO_TIME

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

August 15, 2014 15:54:12 August 15, 2014 13:00 August 15, 2014 16:00

Tags: Database

Similar Questions

  • Need to extract data from the last current period of actuals

    Hi, we need fill a projected account using the last current month and year of actual expenditures in the rules.
    Example: S #Fcst.A #101.Y #2011.P #Mar = S #Actual.A #102.Y # (most cuurent year system). P # (more recent period of system).

    Does anyone know if this is possible? We are on HFM 4.0.1

    Thanks in advance!

    Rick

    Published by: user4631789 on February 10, 2010 13:48

    You can use vba, Month (Now (), and Year (Now ()) to get 3 and 2010 respectively.

  • HP 6730 b - update of results of the last week to atservice.exe put CPU @ 100%

    HP health check recommended to update the drivers of fingerprint digital authentic tec last week that I made.

    Now the flat atservice.exe lines 1 CPU at 100% and the fingerprint reader does not work.

    How can I tell what version I am running and how do I uninstall and install the old version?

    I solved it by going into Device Manager and do back the personal driver (under identification devices)

  • Windows 7 does not search results older than the last thirty days

    When I do a search for files with Windows 7, it pulls only the results of the last 30 days.  How can I get for my entire document file search?

    Hi Bruce,

    I suggest you run the troubleshooter search and Index and check if it helps.

    Open the troubleshooter for search and indexing

    http://Windows.Microsoft.com/en-us/Windows7/open-the-search-and-indexing-Troubleshooter

    Difficulty Windows Desktop Search when it crashes or no results http://support.Microsoft.com/mats/windows_search/en-us

    You can go through the following article help to learn more about Windows Search.

    Windows Search

    http://Windows.Microsoft.com/en-us/Windows7/products/features/Windows-search

    For reference:

    Improve Windows searches the index: frequently asked questions http://Windows.Microsoft.com/en-us/Windows7/improve-Windows-searches-using-the-index-frequently-asked-questions

    Change advanced indexing options

    http://Windows.Microsoft.com/en-us/Windows7/change-advanced-indexing-options

    Hope this information is useful.

  • How to open search results in the same window in Firefox always done before the last update 22

    Before the last update, on that I would do a search let say Google and when I found what I wanted and clicked on, that the window would turn to the result in this window, now it opens a new window. Another question is I noticed when I have gmail open in a window and open another window that result is displayed, and then switches to the original which was open, modified window and the new window is reduced in the bottom taskbar, and I come back to open it again. Whether measures should be taken, please list them.

    Hi years.1, Flash is used by many sites to play videos and audio. It is also used by some sites for menu or the overall presentation systems. Some sites also use Flash to downloaders of files.

    Firefox in general will let you know if a site needs a plugin to display all of the content, but you may also see a message on the site. These messages are not always specific to Flash, but can sometimes say that JavaScript is disabled or else referring to the problem.

  • Delete the results if the user wants to redo the last test

    Hello

    I'm trying to implement a local user to ask them if they want to repeat the last test that failed. So then... Delete the result, and then rerun the sequence.

    Can you see what I'm doing wrong?

    Chris

    Have you seen this example?  It works for you?

    http://www.NI.com/example/27153/en/

  • How can I keep the last 5 test results as the test continues?

    Hello

    I have a test requirement where I need to run a series of engine failure or a large number of tracks, each for a short period of time. I measure intensity charged for each race. I need to keep only the last 5 records of each engine. How to roll the table to just keep the last 5 surveys?

    Where is my aspirin...

    Hi slipstick,.

    Here are the main steps:

  • A transport-level error has occurred when receiving results from the server. (provider: TCP provider, error: 0 - the semaphore timeout period has expired.)

    Hello

    I get the below error message while my windows application inserts data in SQL Server.

    A transport-level error has occurred when receiving results from the server. (provider: TCP provider, error: 0 - the semaphore timeout period has expired.)

    I use LINQ-to-SQL.  SQL Server is installed on Windows server 2003.

    We are using SQL server 2008 r2.

    When we insert large data base records, approximately 1 million we get this question.

    Please suggest.

    Hello

    When you use Windows server, we ask you to send the query in the link depending on whether they are the experts.

    http://social.technet.Microsoft.com/forums/WindowsServer/en-us/home?category=WindowsServer

    Thank you.

  • No approval of the last period of one month.

    Hello

    No approval of the last period of one month. Totally in confusion. Anyone know what the problem is.  We are totally confused. Help, please.

    You say that your applications are queued for a month now?
    These days, it's rather normal to have rather long waiting times until the apps are approved, it is mainly because of the Port-A-tuna (but I have suggested, that you browse through some other threads on this forum for more information).

    A month is now the peak time for approved applications, so it will only take more time to ensure that your applications will be approved/rejected.

    Sometimes you can speed up the process by BlackBerryDev Twitter, but it does not always help. There are also some BlackBerry people on this forum who can help, so contact them is an option to consider: samyotte

    I hope that your applications are approved soon :-)

  • How to get the last day of a month for every 2 months for a given period?

    Hello

    Can is it some please let me know how to get the last day, last day of the week, the weekend last day, last Monday, one month for every 2 months for a given period?

    Thanks in advance.

    Try the below

    SELECT LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2))) lastday.

    BOX WHEN TO_CHAR (LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2))), 'DY') = 'SAT '.

    SO LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2)))-1

    WHERE TO_CHAR (LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2))), 'DY') = 'Sun '.

    THEN LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2)))-2

    Of OTHER LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2)))

    END as lastweekday,

    BOX WHEN TO_CHAR (LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2))), 'DY') IN ('Sam', 'SUN')

    THEN LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2)))

    Of OTHER LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2)))

    -(TO_NUMBER (TO_CHAR (LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2))),' from)) - 1).

    END as lastweekendday,

    BOX WHEN TO_CHAR (LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2))), 'DY') = 'MY

    THEN LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2)))

    Of OTHER NEXT_DAY (LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2))), "LUN")-7

    END AS lastmonday

    FROM (SELECT SYSDATE startdate,

    SYSDATE + 300 enddate

    THE DOUBLE)

    CONNECT BY LEVEL<=>

  • get the last result

    Hi all.
    My problem is that I get some it's whole purpose, as the list have only the last result for all objects in it.and I can't understand why?
    findSentanceArray-return array with sentences that make the search word.
    in this code, I want to get all the phrases that contain the keyword with the keyword.
    In this code, I get double of the last result screen...
    My code is:
    ArrayList<listModel> list = new ArrayList<listModel>();
    listModel listModel=new listModel();
      
    
    this.model=model;
    
       listModel.setListModel("cpu",findSentanceArray(text,"cpu"));
        if (!listModel.sentence().isEmpty())
         list.add(listModel);
    
      listModel.setListModel("screen",findSentanceArray(text,"screen"));
          if (!listModel.sentence().isEmpty())
         list.add(listModel);
    
    
    
     public class listModel{
    public String  attribute=new String();
    public ArrayList  sentence=new ArrayList();
    
    public void setListModel(String  attribute,ArrayList  sentence){
    
    this.attribute=attribute;
    this.sentence.clear();
    this.sentence=sentence;
    }
    public ArrayList sentence(){
    return this.sentence;
    }
    }
         
    Thanks for the help

    I can only see you create a listModel. A common misconception in the subject list.add (e) is there a copy of e, and you can use it again to create another copy. But all this is add a reference to this object to the list. If you call the add() method again it add another reference to the same object and you can end up with many references to an object.

  • Format the first and the last record of query result

    Hello
    I have the following query

    < tt > select 1 seq, "This is the first record" data from dual union of all the
    Select 2, 'Data ' | tNom tab Union all
    Select 3, "It was last last record" double
    order by 1 < /tt >

    When I have the coil this summary to a listfile with col seq noprint option I get:

    This is the first record
    Data MLA_ACCESS_LIST
    Data MLA_APPLICATIONS
    Data MLA_VPD_PCK
    Data MLA_VPD_TABLES
    It was the last last record

    But I want to:

    It's first record MLA_ACCESS_LIST
    Data MLA_APPLICATIONS
    Data MLA_VPD_PCK
    MLA_VPD_TABLES it was save finally last record

    I tried with 1 statement with the use of lead and lag, because first and last record stand the other result record. But I get ORA-30484: lack of specification of the window for this function

    Is this possible with 1 statement or am I've sentenced to modify the results by myself?

    Thank you Auke

    Select row_number() case above (tNom control)
    When 1 then 'it's the first record
    end | tNom |
    -case row_number() over (order by desc tNom)
    When 1 then 'it was the last record. "
    end
    tab
    order by tNom

    HTH

  • What is an indication (0x3) "last execution results" from the list of scheduled task?

    I get the 0 (x 3) in past execution results when the scheduled task runs at night, but the task sems don't work that the files are copied to the external drive?

    Hello

    1. what task is scheduled when you receive this error message?
     
    2. what kind of files were copied during the error 0 x 3?
    System error codes.
     
     
    Method 1
     
    Step 1
     
    Run a scan of system files Checker
     
     
    Step 2
     
    I use a robocopy command, then try to re-register Robocopy.exe, you must:

    1) click Start

    (2) click on run

    (3) type regsvr32 Robocopy.exe

    (4) press on enter

    (5) restart your computer
     
    If you are still facing questions, please go to.
     
    Method 2
     
    Download copy tools Robo (original file intended to be produced server, but the files specified robocopy applies to Windows 7 included in the KIT)
     
     
    Note: If a compatibility Manager appears, click on the program, the installation can be dormant however it is tested to be a successful installation of Windows 7.
     
    Please post the results of the resolution of the problems.
     
    Hope this helps
  • Mac freezes or crashes with the last update of El Capitan

    I have an old iMac (mid 2007), Mac, but I have never had any problems with it until this last update of OS lock (Version OS X El Capitan 10.11.4, although I have returned to an earlier version recently to prevent locking without result).  I have 4 GB memory 667 MHz DDR2 SDRAM, 2.4 GHz Intel Core 2 Duo CPU graphics ATI Radeon HD 2600 Pro 256 MB.  Usually, I use Safari when this happens. It requires a restart of the hard to get it working again. I also have the Machine backup time, which I returned to an earlier version of the operating system at some point.  In general, the cursor still moves, but does not work no matter what windows or controls, that is why it requires the hard reboot.  The Mac reputation is on the line, since I told my friends of Windows that Mac will last at least a decade before they may need to be replaced, while Windows based computers need replacing every 5 years.  Is that what I can do perfectly well apart from the replacement of this computer?

    1. the present proceedings is a diagnostic test. It doesn't change anything for the better or worse and therefore, by itself, will not solve the problem. But with the help of the results of the tests, the solution may take a few minutes, instead of hours or days.

    The test works on OS X 10.8 ("Mountain Lion") and later versions. I do not recommend running it on older versions of Mac OS X. It will do no harm, but it will not do not much good.

    Do not be put off by the complexity of these instructions. The process is much less complicated than the description. You make the tasks more complicated with the computer all the time.

    2. If you do not already have a current backup, please back up all the data before doing anything else. The backup is needed on the general principle, not because of what anyone in the test procedure. Backup is always a must, and when you encounter any kind of problems with the computer, you can be more than the usual loss of data, if you follow these instructions or risk not.

    There are ways to back up a computer that is not fully functional. Ask if you need advice.

    3 here is instructions to run a UNIX shell script, a type of program. As I wrote above, it doesn't change anything. It does not send or receive data over the network. There is no to generate a report on the State of the computer human readable. This report goes nowhere unless you choose to share it. If you prefer, you can act on it yourself without disclosing the contents for me or someone else.

    You should ask yourself if you can believe me, and if it is safe to run a program at the request of a foreign national. In general, no, he's not sure, and I encourage it.

    In this case, however, there are ways for you to decide if the program is safe without having to trust me. First of all, you can read it. Unlike an application that download you and click to start, it is transparent, anyone familiar with the code can check what it does.

    You may not be able to understand the script yourself. But variations of it have been posted on this site several times over a period of years. One of the million registered users to have read the script and set off the alarm if it was dangerous. Then I wouldn't be here now, and you would not be reading this message. See, e.g., this discussion.

    However, if you cannot satisfy yourself that these instructions are safe, do not follow them. Ask other solutions.

    4. here is a general summary of what you need to do, if you decide to go forward:

    ☞ Copy text from a particular web page (not this one) to the Clipboard.

    ☞ Paste into the window to another application.

    ☞ Wait for the test to run. It usually takes a few minutes.

    ☞ Stick the results, which will be copied automatically, in a response on this page.

    These are not specific instructions; just a glimpse. The details are in parts 7 and 8 of this comment. The sequence is: copy, paste, wait and paste it again. You don't need to copy a second time.

    5. try to test in conditions that replicate the problem, to the extent possible. For example, if the computer is slow intermittently, run the test during a downturn.

    You may have started up in safe mode. If the system is now in safe mode and works pretty well in normal mode to test run, restart as usual before running it. If you can test only in safe mode, this.

    6. If you have more than one user and a user is affected by the problem, and the user is not an administrator, and then run the test twice: once under the affected user and one administrator. The results can be different. The user that is created automatically on a new computer, when you start it for the first time is an administrator. If you are unable to log in as an administrator, verify that the user concerned. More personal Mac have only one user, and in this case this section does not apply. Don't log in as root.

    7 load the linked web page (the site "Pastebin.") Press the combination of keys command + A to select all the text, then copy it to the Clipboard by pressing command-C.

    8. start the Terminal application integrated in one of the following ways:

    ☞ Enter the first letters of his name ("Terminal") in a Spotlight search. Select from the results (it should be at the top).

    ☞ In the Finder, select go utilities ▹ of menu bar or press the combination of keys shift-command-U. The application is in the folder that opens.

    ☞ Open LaunchPad and start typing the name.

    Click anywhere in the Terminal window to activate it. Paste from the Clipboard into the window by pressing Command + V, then press return. The text that you pasted should disappear immediately.

    9. If you logged in as an administrator, you will be prompted for your login password. Nothing displayed when you type. You won't see the usual points instead of the characters typed. Make sure that caps lock is turned off. Type carefully, and then press return. You can get a warning to be careful. If you make three unsuccessful attempts to enter the password, the test is still running, but it will produce less information. If you do not know the password, or if you prefer not to enter, just press back three times at the password prompt. Yet once again, the script will run.

    If the test takes much longer that usual to run because the computer is very slow, you can be prompted for your password a second time. The permission you grant by entering it will expire automatically after five minutes.

    If you are not logged as an administrator, you will be prompted for a password. The test will run. It just will not do anything that requires administrator privileges.

    10. the test may take a few minutes to run, depending on the number of files you have and the speed of the computer. A computer that is abnormally slow may take more time to run the test. During execution, a series of lines is displayed in the Terminal window like this:

        Test started
            Part 1 of 4 done at: … sec        …        Part 4 of 4 done at: … sec
        The test results are on the Clipboard.
        Please close this window.

    The intervals between the parties will not be exactly the same, but they give an approximate indication of progress.

    Wait for the final message "Please close this window" appear - again, usually within a few minutes. If you don't see this message in about 30 minutes, the test probably won't be completed within a reasonable time. In this case, press the Ctrl + C key combination or the point command to stop it. Then go to the next step. You will have incomplete results, but still something.

    In order to get results, the test should be allowed to perform or be stopped manually as shown above. If you close the window of the Terminal, while the test is still running, the partial results will not be saved.

    11. when the test is completed, or if you manually stopped, leaving the Terminal. The results have been saved to the Clipboard automatically. They do not appear in the Terminal window. Please do not copy from there. All you have to do is start a response to this comment and then paste it again by pressing Command-V.

    At the top of the results, there will be a line that begins with the words «Start time.» If you do not see that, but rather to see a mass of gibberish, you wait for the message "close this window". Please wait and try again.

    If personal information, such as your name or e-mail address, appear in the results, make anonymous before posting. Usually it will be not necessary.

    12. in the validation of the results, you see an error message on the web page: "you have included content in your post that is not allowed", or "the message contains invalid characters." It's a bug in the software which manages this website. Thanks for posting the results of the tests on Pastebin, then post here a link to the page you created.

    If you have an account on Pastebin, please do not select private in exposure menu to paste on the page, because no one else that you will be able to see it.

    13. When you are finished with the test, it is gone. There is nothing to uninstall or clean.

    14. This is a public forum and others can give you advice based on the results of the test. They speak for themselves, not for me. The test itself is harmless, but all that you can not be. For others who choose to run it, I do not recommend that you view the results of test on this Web site unless I ask.

    15. the related UNIX shell script is a notice of copyright. ASC readers can copy for their personal use. The whole nor any part can be redistributed.

  • JOIN - the last flight search

    The day of flight (QUARTERLY), the name of flight (NUMBER) and the manufacturer (AIRO), which is the last of Luxembourg in Ankara in the period 14.11.06 - 18.11.06 must be determined.

    It's the table 'term' with the attributes NUMBER (TANK), QUARTERLY (DATE) and AIRO (CHAR).

    NUMBER QUARTERLY AIRO
    LH-358 13.11.06 Boing
    LH-421 15.11.06 Boing
    LH-789 17.11.06 Airbus
    LH-112 14.11.06 Boing
    LH-421 17.11.06 Boing
    LH-223 18.11.06 Airbus

    And he comes to the table "fly" with the attributes NUMBER (TANK), BEGIN_FLY (TANK) and END_FLY (CHAR).

    NUMBER BEGIN_FLY END_FLY
    LH-358 Saarbruecken Leipzig
    LH-112 Luxembourg London
    LH-421 Luxemburg Ankara
    LH-789 Luxemburg-New York
    LH-223 Frankfurt Dallas

    My idea was the following:

    SELECT te.timest, te.number, te.airo
    THE TERM JOIN you fly fl
    ON te.number = fl.number
    WHERE the te.timest BETWEEN '14.11.2006' AND ' 18.11.2006 ".
    AND fl.begin_fly = 'Luxembourg' AND end_fly = 'Ankara '.
    AND te.timest =
    (SELECT MAX (te.timest)
    THE TERM);

    The result is false:

    AIRO NUMBER QUARTERLY
    15.11.06 Boing LH-421
    17.11.06 Boing LH-421


    If I ask only the underquery, however, I get one result:

    SELECT MAX (QUARTERLY) "QUARTERLY".
    OF THE term;

    QUARTERLY
    18.11.06

    Where is my mistake of thinking?

    Thanks in advance

    Use of analytical functions makes the query performance wise better and workable. If you are looking for substitutes, you can go to query below. Try this and see. I have not tested.

    SELECT te.timest, te.number, te.airo
    FROM term te JOIN fly fl
    ON te.number = fl.number
    WHERE te.timest BETWEEN '14.11.2006' AND '18.11.2006'
    and te.timest = (select max(timest) from term where number = te.number group by number)
    AND fl.begin_fly = 'Luxemburg' AND end_fly = 'Ankara'
    

Maybe you are looking for

  • Cannot force re-download them El Capitan

    Hi, I can't force redownload El Capitan of a Yosemite facility. My computer crashed while downloading. What works "not": The application is not in my Apps folder. Many previous installer 10.11 - all say that they are corrupt and will not be installed

  • a reference cell to row without locking formula

    I'm trying to limit the amount of formulas I use because it caused the sheet to slow down to a crawl. What I do currently uses a vlookup(picture 2) to get the scores of photo 1 column d and align the page team for all teams. In my view, that this for

  • Firefox hijacked by 'mydomainadvisor '.

    Somehow, Firefox browser seems to have been hijacked by so-called "mydomainadvisor". When I type a URL in Firefox, I get redirected to a "file not found" page with a different address. Tried to delete browsing history, temporary internet files and an

  • HP Pavilion g6 series: operating system not found

    I have a HP Pavilion g6 series... I get the error message "operating system not found. Try disconnectin all disks that do not contain an operating system.  Press Cntr + Alt + Del to restart"I have a dvd with the iso file of windows and can not get th

  • Purpose of blackBerry Smartphones: RIM_bca28a80-e9c0 - 11 d 1-87fe-00600811c6a2 keeps being sent to me

    I get this error message sent to me, the said subject lines: RIM_bca28a80-e9c0 - 11 d 1-87fe-00600811c6a2 It is delivered by: [email protected] and the message says: This message is used to carry data between your BlackBerry handh