How can I show summary for every 15 minutes using the DATE data type

This is probably an easy question, but the answer escapes me...

I'm writing a SQL report that displays totals for each period of 15 minutes. I know you can do something like this for every minute:

Select to_char (import_date, 'DD-MM-YYYY HH24'),
Count (*) from
package_ingest
Group of to_char (import_date, 'DD-MM-YYYY HH24')

But how can I change this query to get me every 15 minutes?

Any feedback is greatly apprecaited!

Thank you

ADK-

Also;

WITH sample_data AS (
   SELECT to_date ('03-09-2009 14:05:05','MM-DD-YYYY HH24:MI:SS') import_date FROM dual UNION ALL
   SELECT to_date ('03-09-2009 14:17:17','MM-DD-YYYY HH24:MI:SS') FROM dual UNION ALL
   SELECT to_date ('03-09-2009 14:24:24','MM-DD-YYYY HH24:MI:SS') FROM dual UNION ALL
   SELECT to_date ('03-09-2009 14:29:29','MM-DD-YYYY HH24:MI:SS') FROM dual UNION ALL
   SELECT to_date ('03-09-2009 14:33:33','MM-DD-YYYY HH24:MI:SS') FROM dual UNION ALL
   SELECT to_date ('03-09-2009 14:44:44','MM-DD-YYYY HH24:MI:SS') FROM dual UNION ALL
   SELECT to_date ('03-09-2009 14:55:55','MM-DD-YYYY HH24:MI:SS') FROM dual)
SELECT
   to_char(import_date,'MM-DD-YYYY HH24:') ||
   to_char(floor(to_number(to_char(import_date,'MI'))/15)*15, 'FM00') interval_15,
   COUNT(*)
FROM sample_data
GROUP BY
   to_char(import_date,'MM-DD-YYYY HH24:') ||
   to_char(floor(to_number(to_char(import_date,'MI'))/15)*15, 'FM00')
ORDER BY 1;

INTERVAL_15         COUNT(*)
----------------- ----------
03-09-2009 14:00           1
03-09-2009 14:15           3
03-09-2009 14:30           2
03-09-2009 14:45           1

Tags: Database

Similar Questions

  • How the PopUp open for every 15 minutes until the user saves data

    Hi all

    I'm working on an application where I need to open a popup for every 15 minutes until the user saves data and stop after users register data. I'm not able to get the idea on how it could be done. Please post some views in which it could be done.

    Thanks in advance.

    Hello
    an alternative is the uncommittedDataWarning property is one out of the box functionality, but don t has setup time.

    https://blogs.Oracle.com/Shay/entry/warning_of_uncommitted_unsaved_changes

    If not, you can use an af:poll in combination with a pop-up message

  • Any ideas how can I insert a pdf into word, by using the option object to insert. However, the pdf file that I want to insert text and annotated lines, but once inserted comments do not appear?  any help would be greatly appreciated.

    Any ideas how can I insert a pdf into word, by using the option object to insert. However, the pdf file that I want to insert text and annotated lines, but once inserted comments do not appear?  any help would be greatly appreciated.

    You will need to find a forum for MS Word, since it is the software you are trying to manipulate in the present.  If you think that the treatment/creation of the PDF file plays a role, then you should ask in the forum for the software that you use to create the PDF file.

    This forum is for a question about downloading and installing Adobe products test, so in all circumstances, your question does not fit in this forum.

  • How can I force Acrobat Professional 11 users to use the "save under" verses "Save"?

    How can I force Acrobat Professional 11 users to use the "save under" verses "Save"?  I want users to type in a form to fill out, but not to save their changes to the original formula.  I want them to be able to save with a different file name.

    You can not force it really, but you can encourage it... For example, you can set the file read-only and add a statement to do it before the file is saved using a script.

  • How can I access Siri on my iMac without using the icon?

    How can I access Siri on my iMac without using the icon?  Can I say "Hey Siri"?

    There is no option "Hey Siri" on a Mac because they do not have the necessary pickups. You must use the icon in the menu bar or Dock.

  • How can I import documents in an FCP project, using the DVD player connected to a MacBook Pro 10.10.5 Super player?

    How can I import documents in an FCP project, using the DVD player connected to a MacBook Pro 10.10.5 Super player?

    You need to rip a DVD? Try MPEG Streamclip or brake hand. Both free. Streamclip better, but much more complicated to install and use.

  • How can I get my Hp officejet 6700 to print the date and time on the fax confirmation page

    How can I configure my officejet 6700 premium to print the date and time on the fax confirmation page?

    Hello

    As long as the date and time is set, it should automatically appear on the print.

    Is the date and time set correctly on the printer?

  • How can I farm Metro application other than by using the Task Manager?

    How can I farm Metro application other than by using the Task Manager? If there is no way, please add a close button, Microsoft.

    Hello

    ·          What version of the operating system is running on your computer?

    Alternatively, press ALT + F4 to close the application.

  • Stupid question CS6. How can I get rid of my experience after using the quick selection tool?

    Stupid question CS6. How can I get rid of my experience after using the quick selection tool?

    The best way would be to make sure that your layer is not a background layer: click the lock icon in this case. Then click the icon at the bottom of the layer panel layer mask. This will create a mask that you can refine and not be destructive.

  • How can I download adobe first 11 items without using the DVD?

    How can I download Adobe Premiere elements 11 without using the installer from the DVD

    PE 10, 11, 12, 13 - https://helpx.adobe.com/premiere-elements/kb/premiere-elements-downloads.html

    You can also download the demo version of the software through the page linked below and then use your current serial number to activate it.

    Don't forget to follow the steps described in the Note: very important Instructions in the section on the pages of this site download and have cookies turned on in your browser, otherwise the download will not work correctly.

    Photoshop/Premiere Elements 11: l http://prodesigntools.com/photoshop-elements-11-direct-download-links-pse-premiere-pre.htm

  • How to program an interface for every 10 minutes

    Hi Experts,

    I did with the creation of interface in ODi11g (ver. 11.1.1.6.0) and my database source and target are Oracle 11 g (ver. 11.2.0.3)
    I need to create the schedule for the interface, and it must trigger automatically for every 10 minutes.

    It's very urgent...

    Please do the needful.

    Note: I need to implement even in Windows XP and Linux (OEL 5.8)

    Thank you
    Phanikanth

    Hmm. I was just testing it. And it worked very well for me. Here is the screenshot of my setup

    http://dwteam.in/WP-content/uploads/2013/01/Schedule_In_10_Min1.jpg

    Chantal

  • How can I stop and then resume when you use the magnetic Lasso tool?

    CS4 on Mac. I have some fairly complicated selections to make and the magnetic lasso tool seems a good choice. However: How can I stop and then resume when in use? For example, I would like to zoom, start by dragging along the edge, then stop, move the image to a different area of it is in the middle of my screen, then pick up again where I left.

    Hi MarieMeyer,

    You can press the SPACEBAR shortcut to activate the hand tool temporarily once you are finished with the selection on a part of the image.

    Then, move the image with the key space key and let it continue with the selection by using the magnetic lasso tool.

    You can use the SHIFT key to add to the selection by using the magnetic lasso tool.

    Kind regards

    Claes

  • How can know you if someone has consulted and used the default Administrator account in Vista?

    I was not aware that the default Administrator account is so easily accessible if there is no password on it. In my view, a standard user has accessed this and it seems that the computer is having a lot of problems now. Is there a way to tell? Needless to say I care that much personal info could acceded as well as commercial information.  Security, 3 administartors (users) appears in some of the boxes, and I only know 2 of them, myself and the default admin?  I'm a recruit of the computer and the other person is somewhat a geek so I could really use some help. I am the system administrator, but don't really know what to look for. I would really appreciate if some wiz could help me.

    Thank you

    Hello

    You can't find if someone has consulted and used the default Administrator account in Vista. You will need to set up a password so that no one will be able to access the admin account.

  • How can I show or hide a picture based on the size of the screen in CS6?

    I have a website created using Dreamweaver CS6. I used the checkerboard to fluid to hold different views for each of the 3 types - phone, Tablet, desktop computer. It works well, resizes properly. I would like to be able to show a picture in the desktop version but not the mobile version. How I do that? I can see in the .css file that the screens of different size can have their own different settings. Y at - it code I could add that could hide/show and image based on the users on the same page window? Let's say I have a div that is named photo. How could I add a parameter to the div photo in the stylesheet that would hide the image if it were mobile?

    Thank you

    Marilyn

    Thanks, I was able to change my code using your example and it works exactly as I wanted!

  • How can I download pages for el capitan? Only the version of the sierra is available on app store.

    Hello

    I already bought Apple Pages and Numbers for use on an iMac running El Capitan. Now I upgraded my macbook pro to El Capitan and want to update these programs, but on the App Store, I am only offered a newer version, which requires the Sierra. How can I get the version I need? Thank you, Robert

    Have you tried clicking on the icon in the Mac App Store to see what is happening? In the past, the Mac App Store will say that version will not run on your operating system & offer to download the latest compatible version. I don't think this has changed, but I don't have a Mac in El Capitan to try.

Maybe you are looking for

  • labview for sending SMS configuration

    Hi, I made a program, but how to choose the mobile number. For example, there are a bar of scrolling for me to select the numbers and when I press on enter the message will be sent. Thank you

  • format wondows 7 of my hard drive

    Remember - this is a public forum so never post private information such as numbers of mail or telephone! format from wondows 7 of my hard drive "I want to load XP in my new laptop windows 7»

  • Fly my laptop

    In recent days, trying to get the solution by posting my problems and my intention was to fix my laptop but yesterday morning I lost my cell phone. Someone come into my room and it took way (in fact, it is not only my laptop that's me.) I'm a student

  • Microsoft wireless laser mouse 8000__

    I have a microsoft 8000 wireless laser mouse.  the problem is that when I put it on the charger it flashes green for about a minute, then he made a flashing red fast.  If anyone can tell me what is the problem I would really appreciate it.  Thank you

  • Error message Windows Installer service while he was trying to install programs

    Original title: installation errors I'm having a problem of downloading various programs. It downloads, but then I get a message popup telling me that windows install is invalid and to contact the site administrator. When it's time to install. I paid