Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to select 5 minutes intervals ?

Christian PitetApr 9 2019 — edited Apr 9 2019

Hi

I have a query displaying 15 mn intervals :

select to_char(trunc(SYSDATE) + rownum / 96,'HH24"h"MI') d, rownum / 4 r

from dual connect by rownum <= 40

The result is :

d         r

00h15 0,25

00h30 0,5

00h45 0,75

01h00 1

01h15 1,25

01h30 1,5

01h45 1,75

02h00 2

02h15 2,25

02h30 2,5

etc...

It is every 15 minutes.

I would like a result showing every 5 minutes intervals :

d         r

00h05 0,08

00h10 0,16

etc...

Thank you for your help.

Regards.

This post has been answered by L. Fernigrini on Apr 9 2019
Jump to Answer
Comments
Post Details
Added on Apr 9 2019
4 comments
5,619 views