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!

Grouping Days with a summary of Count

976439Jan 18 2016 — edited Jan 21 2016

Hi, I am currently trying to workout how I could write a query to group a set of dates like <24 hours, 1-3 days, 3-5 days etc to then give me a count value for dates that fall into these categories.

Unfortunately I haven't built any tables, as I haven't yet seen the source data/tables that I will be using but thought I would make a head start as I have seen the output that will be required (shown below)

DATE | <24 HRS | 1-2 DAYS | 2-5 DAYS |

18-01-16 | 69 | 201 | 218 |

I know how to get the output based on individual days, but not sure how I can group them like the above in a query and this is where I would like some advice or tips on how I could get the output I need.

I appreciate that its vague due to no sample data, but I am trying to make sure I don't fall behind with this.

Any help would be really appreciated.

Thanks in advance.

This post has been answered by unleashed on Jan 18 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 18 2016
Added on Jan 18 2016
4 comments
518 views