I have an oracle database, where I need to group a set of data by every 5 minutes..
so I have a table called Data, which have 3 fields

* ID ==> unique primary key
* Created ==> datetime field
* Position ==> numeric ==> can be one of the following numbers 1, 2, 3, 4

The Data table gets populated from an application that logs data...

I need to get the following,

* where clause that specifies a start date and time and an end date and time

based on the where clause i need the data broken into 5 minute segments and shows how many position counts there are..

so example i need the end result something like this,

```
Date Time              POS  COUNT(1)
31/10/2017 6:00:00 AM   1   7
31/10/2017 6:00:00 AM   2   6
31/10/2017 6:00:00 AM   3   7
31/10/2017 6:05:00 AM   1   4
31/10/2017 6:05:00 AM   2   10
31/10/2017 6:05:00 AM   3   24
31/10/2017 6:10:00 AM   1   6
31/10/2017 6:10:00 AM   2   12
31/10/2017 6:10:00 AM   3   6

```

Any help is appreciated... it is an oracle database... also the date is in GMT format and I need it in Australian date and time

Thanks